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

Q829 How can I open a popup from a main page and then have a script that will close the main page and leave the popup open to use?

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

Try:

<SCRIPT LANGUAGE="JavaScript"><!--
myHandle = window.open('mypage.htm','main','width=400,height=400');
if (!myHandle.opener)
    myHandle.opener = self;
//--></SCRIPT>

Then in mypage.htm:

<SCRIPT LANGUAGE="JavaScript"><!--
window.opener.close()
//--></SCRIPT>

©2018 Martin Webb