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

Q956 How can I submit a form 10 seconds after the page has loaded?

irt.org | Knowledge Base | JavaScript | Form 7.3 | Q956 [ previous next ]

Q956 How can I submit a form 10 seconds after the page has loaded?

Use something like:

<form name="myForm">
</form>

<script language="JavaScript"><!--

setTimeout('document.myForm.submit()',10000);
//--></script>

If however the action is a mailto: then:

<form name="myForm" action="mailto:someone@somewhere.com">
<input type="submit" name="mySubmit">
</form>

<script language="JavaScript"><!--

setTimeout('document.myForm.mySubmit.click()',10000);
//--></script>

In either case the browser will warn the user that a form is being submitted for them, which they can then cancel.

Feedback on 'Q956 How can I submit a form 10 seconds after the page has loaded?'


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.