Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

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?

irt.org | Knowledge Base | JavaScript | Window | Q829 [ previous next ]

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?

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>

Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 30th March 2008. Maintained by: Martin Webb and Michel Plungjan
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2008 irt.org, All Rights Reserved.