Auto Submit Form

This script allows you to limit the time your user has to fill out a form, it's very useful when you want to make a JavaScript Game, or a asking a question that has a time limit for your user to answer. In this example, the form will auto submit after 30 seconds once the page is loaded.

Your Name: 
Male
Female

E-Mail Address: 


 

Cut and paste the source code of the above script here (Read  How to Cut N Paste for help)

<!-----------------Cut---------------->
<HTML>
<HEAD>
   <TITLE>Auto Submit Form</TITLE>
<SCRIPT>
<!--
//    Script Editor:   Howard Chen
//    Browser Compatible for the script: IE 2.0 or Higher
//                                       Netscape 2.0 or Higher
//    This script is free as long as you keep its credits
var timeID = setTimeout("document.forms[0].submit()", 30000)  //Change the number here to change the time limit.
//-->
</SCRIPT>
</HEAD>
<BODY>
<FORM ACTION="Submitted.htm" NAME="Sample">
Your Name:<INPUT NAME="name" size="25">
<BR><INPUT Type=radio NAME="sex" VALUE="M">Male
<BR><INPUT Type=radio NAME="sex" VALUE="F">Female
<P>E-Mail Address:<INPUT NAME="email" size=15>
<BR><INPUT TYPE=SUBMIT>
</FORM>
</BODY>
</HTML>
<!------------------End------------------->

IMPORTANT: The scripts provided in this page are free as long as you keep the credits in the code.  E-mail me or use Script Rebuild Service for additional help about Cut N Paste or to ask for a script that is just for you.

Post Your Script Home