E
Eli
HI! I made some quiz using one HTML form (few question with few
radio-button each like potential answers) that have one Submit button.
I would like to simulate click on this button (e.g. named "Finish")
after some time, 10 minute or so, which be equal like click on submit
button and terminate quiz (open another page or so). I tried to solve
it by JavaScript but won't, always error, like can't detect button like
object. What to do? Listing is:
<script type="text/javaScript">
var t=setTimeout("alert('Time of 60 sec is up!')",60000)
document.forms[0].submit();
document.getElementByTagName("Finish").click();
//Also I tried this:
//document.getElementById("Finish").click();
//but doesn't working!
document.getElementById("quizform").submit();
</script>
<p> </p>
<form action="results.php" method="post" name="quizform"
target="_blank" id="quizform">
....
....
<input name="Finish" type="submit" id="Finish" value="Finish" />
</form>
<p> </p>
</body>
</html>
radio-button each like potential answers) that have one Submit button.
I would like to simulate click on this button (e.g. named "Finish")
after some time, 10 minute or so, which be equal like click on submit
button and terminate quiz (open another page or so). I tried to solve
it by JavaScript but won't, always error, like can't detect button like
object. What to do? Listing is:
<script type="text/javaScript">
var t=setTimeout("alert('Time of 60 sec is up!')",60000)
document.forms[0].submit();
document.getElementByTagName("Finish").click();
//Also I tried this:
//document.getElementById("Finish").click();
//but doesn't working!
document.getElementById("quizform").submit();
</script>
<p> </p>
<form action="results.php" method="post" name="quizform"
target="_blank" id="quizform">
....
....
<input name="Finish" type="submit" id="Finish" value="Finish" />
</form>
<p> </p>
</body>
</html>