DeathStar Posted April 2, 2007 Share Posted April 2, 2007 hi there. i want to let a form submit ever 2 seconds to test a thing with my server. how would i go about doing it? Link to comment https://forums.phpfreaks.com/topic/45328-submit-a-form-every-x-seconds/ Share on other sites More sharing options...
papaface Posted April 2, 2007 Share Posted April 2, 2007 Use javascript, this is the PHP forum. Link to comment https://forums.phpfreaks.com/topic/45328-submit-a-form-every-x-seconds/#findComment-220076 Share on other sites More sharing options...
only one Posted April 2, 2007 Share Posted April 2, 2007 <table> <tr> <td style= align="center" width="250" height="20"> <font face=arial color=#000000 size=1><div id="message_html" class="messagehtml" }>Please enable javascript</div></font> </td> </tr> </table> <script language='Javascript'> setup=2; function countdown() { if ((0 <= 100) || (0 > 0)) { xsetup = setup--; if(xsetup == 0) { if (0) document.getElementById("messagehtml").innerHTML = 'blah'; if (0) document.getElementById("message_html").innerHTML = '<?php update here ?>'; countdown(); } if(xsetup > 0) { document.getElementById("message_html").innerHTML = '+xsetup+''; setTimeout('countdown()',1000); } } } countdown(); function SetCookie(cookieName,cookieValue,nHours) { var today = new Date(); var expire = new Date(); if (Hours==null || nHours==0) Hours=1; expire.setTime(today.getTime() + 3600000*Hours); document.cookie = cookieName+"="+escape(cookieValue) + ";expires="+expire.toGMTString(); } </script> this hasnt been tested! Link to comment https://forums.phpfreaks.com/topic/45328-submit-a-form-every-x-seconds/#findComment-220084 Share on other sites More sharing options...
DeathStar Posted April 2, 2007 Author Share Posted April 2, 2007 where wud i put the form? <form><input><form> Link to comment https://forums.phpfreaks.com/topic/45328-submit-a-form-every-x-seconds/#findComment-220103 Share on other sites More sharing options...
needshelp Posted April 2, 2007 Share Posted April 2, 2007 - Link to comment https://forums.phpfreaks.com/topic/45328-submit-a-form-every-x-seconds/#findComment-220175 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.