Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

Q620 How can I warn that a form submission is due after 25 minutes then submit after a further five minutes?

irt.org | Knowledge Base | JavaScript | Date | Q620 [ previous next ]

Q620 How can I warn that a form submission is due after 25 minutes then submit after a further five minutes?

Try:

<HTML>
<HEAD>
<SCRIPT LANGUAGE="JavaScript"><!--
function first() {
    alert('Five minutes left');
    setTimeout('second()',(1000*60*5));
}

function second() {
    document.myForm.submit();
}
//--></SCRIPT>
</HEAD>

<BODY onLoad="setTimeout('first()',(1000*60*25)">

<FORM NAME="myForm">

...

<INPUT TYPE="SUBMIT">
</FORM>

</BODY>
</HTML>

However, this will not submit a form where the action is mailto:


Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 30th March 2008. Maintained by: Martin Webb and Michel Plungjan
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2008 irt.org, All Rights Reserved.