Popup Blocker Detection 2

General

This is a simple, cross-browser method for testing for pop-up blockers. Most scripts test the return value of window.open and conclude that there is a blocker installed if the returned value resolves to false in a boolean statement. However, these scripts fail with browsers such as Opera (as of v9) that return a window object but disable it. This script properly handles this, as well as a null or undefined return type.

Notes

Created by: Jeff Johnson

Posted: December 20, 2006

Source Code

Paste this source code into the designated areas.

External file

Paste this code into an external JavaScript file named: detectPopupBlocker.js