Hello,
I wrote a script that loops through a list of addresses and does stuff
with those addresses, and while it is working there isn't anything to
see. In order to be able to see progress being made, I thought I
could make a couple of text boxes in a form and have one box show the
address number it's on and the other show the total number of
addresses... so basically I want one box to say for example 10, if
there were 10 addresses and the other box to count from 1 to 10 as it
processes...
<script>
function begin() {
count=0;
num=document.ad ds.num.value;
while (count < num) {
document.adds.c ount.value=coun t;
RunSearch();
count++;
delay(1000);
}
}
function delay(gap){ /* gap is in millisecs */
var then,now; then=new Date().getTime( );
now=then;
while((now-then)<gap)
{now=new Date().getTime( );}
}
</script>
<form name=adds method=POST>
<input type="text" name=count value=>
of
<input type="text" name=num value=10>
<input type="button" onClick="begin( );">
</form>
When I execute this, it shows the first box blank, the second box with
a 10 in it and then after the script is finished it then makes the
first box a 10. I was hoping to make the first box update as it
goes, showing a 1, then 2, then 3....
Is what i'm trying to do not possible or am I just doing something
wrong?
Thanks,
Jeff
Comment