Long story short, I'm making an online test to help prepare some buddies for an online math test. The test is timed and so I am trying to put in a counter to count down to zero. My code looks like this:
-
function clock()
-
{
-
if (document.clock.display.value>0){
-
setTimeout("clock()",60);
-
document.clock.display.value = document.clock.display.value - 1;
-
document.clock.display.write("document.clock.display.value");
-
document.clock.display.close();
-
}
-
else {
-
alert("Your time is up!");
-
}
-
}
-
It is started by an onLoad from the body tag. It links to:
-
<form name="clock">
-
<input type="textarea" name="display" value="30">
-
</form>
-
Now the thing is - it works, and it gets to zero and throws up the alert. However, IE is bent on telling me that the "object doesn't support that property or method". What's going on here? Sure it works, but I'm kind of a perfectionist and bad code is not okay.