irt.org Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt

Q428 How can I close the current window after opening a new popup window?

You are here: irt.org | FAQ | JavaScript | Window | Q428 [ previous next ]

Give the popup window a chance to load properly and then close the current window after a delay:

<SCRIPT LANGUAGE="JavaScript"><!--
window.open("mywindow.htm","newwindow","width=725,height=125");
setTimeout(\'window.close()\',5000);
//--></SCRIPT>

©2013 Martin Webb

ArticlesFAQsGamesFeedback

FOLDOCRFCsInstant JavaScriptSoftwareBooksJavaScript Programmer's ReferenceAboutTop