If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

opgave.value would eventually look something like:"2 + 2" in stringformat but I would need to be able to evaluate what the calculation produces to an answer inputted by the user. So in our example 2+2 = 4 would give a correct answer and not 22.

Try starting the game, fill in some numbers and wait for the game to end(alert should pop).
Now press the button "Controleer het antwoord" once again. It should throw an alert("Klik eerst op de knop \"Start het spel\"") but it doesn't. This is the problem.

I do not see any use of timer that can't be accomplished with a boolean variable. Try making a variable to keep track of the timer... set when started, clear when ended. setInterval can be assigned to a variable, but I'm not sure if setTimeout can.

It can. I have used it in several other occassion before. The problem lies not with the timer but with the eval() function although I have no idea what is wrong with it. Fang suggested a solution(http://www.webdeveloper.com/forum/sh...d.php?t=224635) in the other thread but it was too vague. Maybe someone can explain why exactly the eval does not work.