Hey all, I need a countdown timer from 10 to 0, which stops once reaching 0. For some reason I couldn't find any of this on search engines or sites, but it seems pretty simple to me.. Any ideas? Thanks! Jay
ok cool <div id="counterDiv"> <form name="counter"><input type="text" size="3" name="number"> seconds</form> </div> <script> var countdownfrom=10 // seconds to countdown var currentsecond=document.counter.number.value=countdownfrom+1 function counter() { if (currentsecond!=1) { currentsecond-=1 document.counter.number.value=currentsecond } else{ // if you really don't want it to do anything then delete the line below document.getElementById("counterDiv").innerHTML = "Nothin to do" return } setTimeout("counter()",1000) } counter() </script> PHP: