kinx
07-17-2003, 06:08 AM
I have a window being opened through a content managed flash site, the text editor only allows windows with all browser controls to be opened, I wanted a pop up at a set size with no browser controls.
I though I could open a page with all the browser controls, get that page to open a popup and then close itself.
The initial problem was that the pop up opened no bother but the window asked if the user really wanted to close it, it didnt seem to realise that javascript had actually opened this window, I got around this by the following code:
<SCRIPT LANGUAGE="JavaScript">
<!-- hide script from older browsers
var remote = null;
function launchWindow() {
remote = window.open("/tour/index.html", "remote", "height=420,width=760");
//return false;
}
// Make the 'win' reference the full page frame
win = top;
// Tell the browser the main frame is a popup window
win.opener = top;
// open the real popup window
launchWindow();
// Close the so-called popup window
win.close ();
//-->
</SCRIPT>
</head>
<BODY onload= "launchWindow()">
</body>
in explorer 6.0.2600 this works fine, on a mac it works fine, on explorer 6.0.2800 it opens the first window with the code, but no popup then closes itself, any ideas?
I though I could open a page with all the browser controls, get that page to open a popup and then close itself.
The initial problem was that the pop up opened no bother but the window asked if the user really wanted to close it, it didnt seem to realise that javascript had actually opened this window, I got around this by the following code:
<SCRIPT LANGUAGE="JavaScript">
<!-- hide script from older browsers
var remote = null;
function launchWindow() {
remote = window.open("/tour/index.html", "remote", "height=420,width=760");
//return false;
}
// Make the 'win' reference the full page frame
win = top;
// Tell the browser the main frame is a popup window
win.opener = top;
// open the real popup window
launchWindow();
// Close the so-called popup window
win.close ();
//-->
</SCRIPT>
</head>
<BODY onload= "launchWindow()">
</body>
in explorer 6.0.2600 this works fine, on a mac it works fine, on explorer 6.0.2800 it opens the first window with the code, but no popup then closes itself, any ideas?