Acrappa
05-06-2003, 02:42 AM
First of all, here is my project:
http://members.cox.net/acrappa/javascript/project9.html
Everything related to the quiz itself is working properly. What I am working on now is the scrollbar status which displays how long the user has been working on the test. This is done with setInterval and a function. The counter works how I want it to, too. The issue that I am trying to resolve is, at the end of the quiz, the results are prompted to the user, and in there I want to display how long it took the user to complete the quiz. The problem is that the time information is stored in a variable within one function and thus can't be called in another. At least, there is no way that I know of to do this. What would be the ideal way to display how long it took the user complete the quiz in the dialogue box?
Also, is there a way to have the timer stop counting when the user presses the Submit Quiz button?
http://members.cox.net/acrappa/javascript/project9.html
Everything related to the quiz itself is working properly. What I am working on now is the scrollbar status which displays how long the user has been working on the test. This is done with setInterval and a function. The counter works how I want it to, too. The issue that I am trying to resolve is, at the end of the quiz, the results are prompted to the user, and in there I want to display how long it took the user to complete the quiz. The problem is that the time information is stored in a variable within one function and thus can't be called in another. At least, there is no way that I know of to do this. What would be the ideal way to display how long it took the user complete the quiz in the dialogue box?
Also, is there a way to have the timer stop counting when the user presses the Submit Quiz button?