You are here: irt.org | FAQ | JavaScript | Form | 7.3 | Q647 [ previous next ]
You'll need a frameset with a hidden page:
<HEAD>
<SCRIPT LANGUAGE="JavaScript"><!--
function startTimer() {
setTimer('sayThanks()',5000); // say thankyou after 5 seconds
}
function sayThanks() {
top.location.href = 'thankyou.htm';
}
//--></SCRIPT>
</HEAD>
<FRAMESET ROWS="100%,*">
<FRAME SRC="page_with_form.htm">
<FRAME SRC="about:blank"> <!-- or blank.htm, which contains nothing -->
</FRAMESET>
Then alter your form so that it does:
<FORM onSubmit="parent.startTimer()">