Jump to content

Timer then submit?


gibbonuk

Recommended Posts

you will have to use javascript. look at set_interval or set_timeout to make this happen.

FYI thought - having a page that refreshes every minute is gonna be annoying as hell!! A better solution would be to use ajax to process the form in the background and not refresh the page all the time.

Link to comment
https://forums.phpfreaks.com/topic/243948-timer-then-submit/#findComment-1252602
Share on other sites

something like:

 

<script type="text/javascript">
function timedSubmit(){
document.FORMNAME.submit();
setTimeout("timedSubmit()",1000); // 1 second
}
// initiate:
setTimeout("timedSubmit()",3000); // 3 seconds
</script>

 

change FORMNAME to whater your <form name=""> is.

Link to comment
https://forums.phpfreaks.com/topic/243948-timer-then-submit/#findComment-1252609
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.