Hi all,
I'm building a quiz and user has 5 seconds to respond to the qeustion if he doesn't resond within the time the answer is 3(wich is a code for no answer). Timer updates just fine until you answer a qeustion from that point the timer runs out of control you see 5,3,4,0 and go to the next qeustion with the answer 3 does anyone know how to kill the old timer?
function tijd(aantalSec){
document.getElementById("sec").innerHTML = aantalSec;
if(aantalSec == 0){
clearTimeout(tijd);
antwoord(3);
}else{
aantalSec = aantalSec - 1;
var tijd = setTimeout('tijd(' + aantalSec + ',0)',1000);
}
}