You are here: irt.org | FAQ | JavaScript | Form | 10.3 | Q216 [ previous next ]
Use a timer to close the window, and add a TARGET to the form:
<form action="apage.html" target="mywindowname" onSubmit="setTimeout('window.close()',2000)"> <input type="submit"> </form>
Now make sure that in the main window you set its name (by default the main window has no name):
<script language="JavaScript"><!-- window.name="mywindowname"; // will not work in Netscape Navigator 2 as name is read only //--></script>