Skip to content Skip to sidebar Skip to footer

I Am Writing Code To Conduct Online Test , Got Trouble In Auto Submit

I have used PHP, JS , Mysql and Html Every thing is working except auto submit and timer. After 20 min it should auto submit with user selected option and stores in mysql. popups '

Solution 1:

I hope following code will help you to auto submit a form.

just copy paste this code in a new page and run.

You will see after 20 min submit button will auto click and show a message.

From this concept you cant auto submit after specific time


<scriptsrc="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"type="text/javascript"></script><script>var submitForm = function() {
    $("input[name='submit']").click();
}

functionwaitSpecificTime(minute)
{
    setTimeout(submitForm, 1000*60*minute) //20 min
}

waitSpecificTime(20); // 20 min</script><inputtype="submit"value="submit"name="submit"onclick="alert('test');"/>

Post a Comment for "I Am Writing Code To Conduct Online Test , Got Trouble In Auto Submit"