hello,
I have a function that creates two random numbers and I want to display them to the user like this:
numA + numC = [input box & submit button]
this is not a problem but I want to display five of these in a row. I can make a counter but I can't get it to work in netscape.
here is what my code looks like at this moment.
+++++++++++++++++++++++++++++++++++
<script>
function random(maxValue) {
day= new Date();
hour= day.getHours();
min=day.getMinutes();
sec=day.getSeconds();
mili=day.getTime()
return(((hour*3600)+(min*60)+(sec)+mili) % maxValue);
}
function ranom(maxValue) {
day= new Date();
mil=day.getTime();
return((mil) % maxValue);
}

function add()
{
maxValue=100;

numA=random(maxValue);
numB=ranom(maxValue);
numC=numA + numB;

alert(numA + " " + numC);
for (var counter=0; counter<5; counter++)
{
document.write ("<p>" + numA + "+" + numC + "=" +"<br>"+ "</p>");
add()//I tried this for netscape but it doesn't work
}
//alert(counter)
}
</script>

<form name="daForm">
<input type="button" value="submit" onClick="add();">
</form>
++++++++++++++++++++++++++
this works in IE if I take out the line that calls add() after document.write
other wise it loops continually and I have to ctrl alt delete to exit the browser.

any help on this is greatly apreciated.
thanks