This displays a countdown from 20 to 0. What I would like to do is after the time is up, display a link to the next page. Which I can do fine. But I'd like to do a check to see if seconds > 0 = "You're moving to fast" ELSE process next page
I don't know how to store the number of seconds in a variable to do this?
add - onClick event on the link - when user clicks on it trigger a function that checks if the number of seconds is 0 or more and do the action you wish.
Just to add - have you tested if your time-out "gate" can go in -1, -2, -3 - because you use it for security reasons just work a little on it - although it should work as is.
<script>
<!--
var timeout = 1000; var num = 0; var na = "e;00"e;; var secs = 20;
function go(){ na = secs; if (secs < 10) { na= "e;0"e; + na; }
document.getElementById("e;countDownText"e;).innerHTML = na;
secs = secs - 1
if (secs+1 < 1) {
document.getElementById("e;countDownText"e;).innerHTML = "e;<a href=\"e;surf_frame.php?surfed=yes&numsecs=secs+1\"e;><h3>Go</h3></a>"e;;}
if (secs+1 > 0) { setTimeout("e;go();"e;,timeout); }
}
-->
</script>
how can I change the link <a href=\"surf_frame.php?surfed=yes&numsecs=secs+1\"> into a link where secs+1 will be the variable for the number of seconds? instead of it writing secs+1 into the link?