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

Q597 How can I direct the browser to a custom thank you page after the form is submitted?

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

Q597 How can I direct the browser to a custom thank you page after the form is submitted?

The easiest way is with a cgi script on the server, failing that you can use a frameset with a hidden frame:

<frameset cols="100%,*">
<frame src="formpage.htm" name="formpage">
<frame src="scriptpage.htm" name="scriptpage">
</frameset>

and then in the form page:

<form onSubmit="parent.scriptpage.go()">
...
<input type="submit">
</form>

And then in the script page:

<script language="JavaScript"><!--
function go() {
    setTimer('now()',5000); // delay of five seconds
}

function now() {
    parent.location.href = 'thankyou.htm';
}
//--></script>

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.