You are here: irt.org | FAQ | JavaScript | Form | 7.3 | Q597 [ previous next ]
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>