I want to add 5 minute countdown timer which submit a form to my php page.
<form name="myfm" id="myfm" method="post" action="Quiz.php">
<table width=100%> <tr> <td width=30><td></td></td></tr> <table border=0>
<?php $n=$n+1; ?>
<tr><td>Question <?php echo $n." "; echo $row[2]; ?></td></tr>
<tr><td class=style8><input type="radio" name="ques['<?php echo $n; ?>'][]" value=1><?php echo $row[3]; ?></td></tr>
<tr><td class=style8> <input type="radio" name="ques['<?php echo $n; ?>'][]" value=2><?php echo $row[4];?></td></tr>
<tr><td class=style8><input type="radio" name="ques['<?php echo $n; ?>'][]" value=3><?php echo $row[5];?></td></tr>
<tr><td class=style8><input type="radio" name="ques['<?php echo $n; ?>'][]" value=4><?php echo $row[6];?></td></tr>
<?php
}
echo "<tr><td><input type=submit name=submit id='result' value='Get Result'></form>";
?>
</table></table>
</form>
Please help me..I am doing a quiz page that automatically submit form when countdown ends.Thankyou...
Here is what you want, I used a while ago - https://jsfiddle.net/v5uc9wfx/3/
Here -
Duration is passed in seconds, i.e. 300 second= 5 Minutes. display is another parameter you want to display where.
You might need to clear interval as well-
With form
Hope this helps
you can use Window setTimeout() Method to call submit form after 5 minutes
setTimeout()
will fire a functionSubmitForm
after300000
milliseconds = 5 minutes.