You are here: irt.org | FAQ | JavaScript | Form | 7.3 | Q759 [ previous next ]
To submit a form to email and then alter the current location requires a Frameset with a hidden frame:
<FRAMESET ROWS="100%,*"> <FRAME SRC="form.htm"> <FRAME SRC="blank.htm"> </FRAMESET>
Then when the form is submitted use:
<FORM ... onSubmit="parent.frames[1].location.href='trigger.htm'">
and then in trigger.htm:
<SCRIPT LANGUAGE="JavaScript"><!-- function tripIt() { parent.frames[0].location.href = 'thanks.htm'; } setTimeout('tripIt()',5000); //--></SCRIPT>