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

Q1114 How can I create a popup window where the user can select which link they would like to go to and have the page load in one frame on the main window, and then close the popup window?

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

In the frame in the parent window:

<script language="JavaScript"><!--
WinId = window.open('links.html','linkswindow','width=300,height=400');
if (!WinId.opener) WinId.opener=self;
//--></script>

In the links.hmtl:

<a href="javascript:opener.location = 'http://www.netscape.com'; self.close()">Netscape</a>
<a href="javascript:opener.location = 'http://www.microsoft.com'; self.close()">Microsoft</a>

Feedback on 'Q1114 How can I create a popup window where the user can select which link they would like to go to and have the page load in one frame on the main window, and then close the popup window?'

©2013 Martin Webb

ArticlesFAQsGamesFeedback

FOLDOCRFCsInstant JavaScriptSoftwareBooksJavaScript Programmer's ReferenceAboutTop