Netscape DevEdge

Skip to: [content] [navigation]

Popup Window Controls and Your Website

Netscape 7.01 allows users to control most unsolicited attempts to open new windows such as popup and popunder windows. Learn how to detect Popup Controls, how to ask your readers to enable popups for your site and how to get the benefits of popup windows without using popup windows.

Using the Preference for Privacy & Security - Popup Controls, Netscape 7.01 users can:

What Popup Windows are suppressed ?

Netscape 7.01 will attempt to suppress all calls to which occur in the following circumstances:

What Popup Windows are not suppressed?

Any attempt to open a popup window that is the direct result of user action, such as clicking on a hyperlink, should succeed in opening popup windows even if the user has popup controls enabled on your site.

Detecting Suppressed Popups Windows

If a user has popup controls enabled for your site, any attempt to call in global script, in an onload handler or in setTimeout() or setInterval() will return null rather than a reference to the opened window.

	  <title>Detecting Popup Controls</title>
	  <script type="text/javascript">
	  // attempt to open an unsolicited window
	  var popup ='about:blank', 'popup');
	  if (!popup)
	    // the user has suppressed the popup
	  // -->
	  // your page here

If your popup window is crucial to the operation of your web site you can notify the user and ask them to add your site to the list of sites which are allowed to use unsolicited popup windows. You can also provide a hyperlink which can be used to open a popup window even in the event that the user has suppressed unsolicited popups on your site.

Replacements for Popup Windows

If your popup was created during the time the web page was loading, you may consider using document.write() to emit appropriate HTML which will contain the same information as the popup window. You can also use either the advanced features in the Document Object Model (DOM) or innerHTML to create the appropriate HTML.


This example (view example source) illustrates detecting suppressed popup windows as well as an approach for replacing popup windows with inline HTML using innerHTML.