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

Q186 Is there any way of sending an email using a form and moving to another page at the same time?

irt.org | Knowledge Base | JavaScript | Email | Q186 [ previous next ]

Q186 Is there any way of sending an email using a form and moving to another page at the same time?

The following will change the location 5 seconds after the form submission:

<SCRIPT LANGUAGE="JavaScript"><!--
function settimer() {
    setTimeout('location.href="dummy.html"',5000);
}
//--></SCRIPT>

<FORM ACTION="mailto:someone@somewhere.com" METHOD="POST" ENCTYPE="text/plain" onSubmit="settimer()">
<INPUT TYPE="SUBMIT">
</FORM>

Note the above does not work in Internet Explorer 3, as it does not support the mailto: action.

Feedback on 'Q186 Is there any way of sending an email using a form and moving to another page at the same time?'


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.