Forum Moderators: open
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>
<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.