exam with timer in javascript
<p>I would appreciate it if you can help me with this program. I would like the program to run ike this:</p>

<ol>
<li>upon clicking a button, a question like 3 X 2 will be written in the document with a textbox wherein I can put the answer. </li>
<li>check if the answer is right or wrong using a promptbox.</li>
<li>It should have a timer that goes from 60 to 0 and when it reaches zero and you weren't able to answer it, then it will prompt you that the time is up.</li>
</ol>

<p>I figured out the countdown timer already. I just don't know how to create the rest ^_^.</p>

<p>it would be great if you can incorporate it with my codes that i have figured. here is my code so far..</p>

<pre><code>&lt;html&gt;
&lt;head&gt;
&lt;title&gt;JavaScript Timer&lt;/title&gt;
&lt;script type="text/javascript"&gt;

var SECONDS_LEFT, TIMER, TIMES_UP;

function resetTimer(seconds){
 SECONDS_LEFT = seconds;
 document.Timer.TimeLeft.value = SECONDS_LEFT;
 clearTimeout(TIMER);
}

function decrementTimer(){
 TIMES_UP = false;
 document.Timer.TimeLeft.value = SECONDS_LEFT;
 SECONDS_LEFT--;


 if (SECONDS_LEFT &gt;= 0) {
  TIMER = setTimeout(decrementTimer, 1000);
 } else {
  alert("Time's up!");
  resetTimer(60);
 }
}
&lt;/script&gt;
&lt;/head&gt;
&lt;body onload="resetTimer(60)"&gt;

&lt;form name="Timer" onsubmit="return false;"&gt;
Timer: &lt;input type="text" name="TimeLeft" size="2"
  style="text-align:center" onfocus="this.blur();"&gt;
  seconds left&lt;br&gt;
  &lt;input type="button" name="btnStart" 
   value="Start Quizz" onclick="decrementTimer();"&gt;
  &lt;input type="button" name="btnReset" 
   value="Retry" onclick="resetTimer(60);"&gt;
&lt;/form&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>
