Forum Moderators: open

Message Too Old, No Replies

Pop-up blocker ignores exceptions in modal window

Pop-up blocker bug

         

webjul

9:57 pm on Feb 13, 2006 (gmt 0)



Our website uses pop-up windows. We have configured the google toolbar to allow pop-ups for our site. Our site first opens a modal window. This modal window attempts to open a third non-modal window. The pop-up blocker in the Google toolbar prevents the third window from opening, even though we have the toolbar pop-up blocker configured to allow pop-ups from our site.

Here is a simple test case consisting of 3 html pages:

index.htm:
----------


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
<title>Untitled</title>
<script type="text/javascript">
function useWindow() {
var winRef = window.open('winContent.htm');
}

function useModal() {
var modalResults = window.showModalDialog('winContent.htm');
}
</script>
</head>
<body>
<li>Test with Internet Explorer.</li>
<li>Make sure you accessing these pages in the Interent zone (i.e. put them on a web browser and access with the FQDN)</li>
<li>Enable the Google Popup Blocker and allow popups for the site hosting these pages</li>
<p>
This test will first open an object of the button type selected,
then the contents of that object will attempt to open a window.
Try clicking each with the CTRL button held down for an additional test.
</p>
<button onclick="useWindow();">Window</button>&nbsp;&nbsp;&nbsp;
<button onclick="useModal();">Modal</button><br>

<p>
In my tests the window opening a window works fine, but the modal opening a window fails.
</p>
</body>
</html>

winContent.htm
--------------


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Window Content</title>
<script type="text/javascript">
function init() {
RW = window.open('last.htm','FinalWin');
if (RW == null) {
alert('BAD: Window Reference is null');
} else {
alert('GOOD: Window Reference is OK');
}

}
</script>
</head>
<body onload="init();">
I attempt to open a window onLoad.
</body>
</html>

last.htm:
---------


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
<title>Last Open</title>
</head>

<body>
Last Window
</body>
</html>

Julie
Website Developer
RealGo, Inc.