PDA

View Full Version : countdown and submit form


seth
10-19-2005, 08:29 AM
hi everyone ,
i need a java script to submit a form after a specific time.
for example some one is filling a form and he/she has time just for 1 minute.
after 1 minute form will be submit automatically. :)

seth
10-19-2005, 05:13 PM
no one here to help me

mattster
10-21-2005, 02:07 PM
Just put the following after the form:

<script language="JavaScript">
<!--
setTimeout('document.MyForm.submit()',6000);
//-->
</script>

where MyForm is the name of the form you wish to submit.

ddadmin
10-21-2005, 06:26 PM
You actually can't automatically submit a form, even with the above code. Most browsers will prompt the user whether he wants to allow this action if a script tries to do so. This is a security feature.