affordit Posted March 28, 2008 Share Posted March 28, 2008 I am trying to get this form to auto submit after 5 minutes, but don't work. <script language=javascript type=text/javascript> <!-- Script courtesy of http://www.web-source.net - Your Guide to Professional Web Site Design and Development function stopRKey(evt) { var evt = (evt) ? evt : ((event) ? event : null); var node = (evt.target) ? evt.target : ((evt.srcElement) ? evt.srcElement : null); if ((evt.keyCode == 13) && (node.type=="text")) {return false;} } document.onkeypress = stopRKey; --> </script> <script language=javascript type=text/javascript> setTimeout("submitForm()", 60000); function submitForm() { document.5_min_test.submit(); } </script> <?php print " <form name = '5_min_test' action='print_results.php' method='POST'> <table align='center' border='0'> <tr> <td align = 'left'>Name:</td><td><input type='text' name='name' size='30' maxlength='100'></td> </tr> <tr> <td align = 'left'>Email:</td><td><input type='text' name='email' size='30' maxlength='100'></td> </tr> </table> </form>"; ?> Link to comment https://forums.phpfreaks.com/topic/98354-can-someone-tell-me-what-i-am-missing-here/ Share on other sites More sharing options...
nogray Posted March 28, 2008 Share Posted March 28, 2008 the form name or is can't start with a number name = '5_min_test' you can change it to name = 'five_min_test' Link to comment https://forums.phpfreaks.com/topic/98354-can-someone-tell-me-what-i-am-missing-here/#findComment-503426 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.