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

Q1571 How can I prevent a popup window being reloaded if the main page is refreshed or reloaded?

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

Q1571 How can I prevent a popup window being reloaded if the main page is refreshed or reloaded?

Use the following, which creates the popup window, and reuses any of the same name, and then only loads a page into the popup window if the popup window dows not already contain the page:

<script language="JavaScript"><!--
var WinId = window.open('','newwin');
if (WinId.location && WinId.location.href.indexOf('mypage.html') == -1) WinId.location.href = 'mypage.html';
//--></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.