MSIE: Javascript popups & 'access denied' error
by David Mintz <mambomintz(at)yahoo.com>
|
Date: |
Mon, 22 Jan 2001 12:13:12 -0800 (PST) |
To: |
hwg-languages(at)hwg.org |
|
todo: View
Thread,
Original
|
|
I'm sure this must be in the archives, but the
archives are unavailable right now, so my apologies.
I have this generic popup window function like so:
function popupWindow(file,w,h) {
var popup =
window.open(file+".php3",file+"PopupWin","width="+w+",height="+h+",scrollbars=yes,status=yes,resizable=yes");
popup.focus();
}
Anyone see anything wrong with it? It takes three
arguments filename(location), window width and height.
It works fine in Netscape 4.08 but in Explorer 4.72 it
works ONLY IF the popup isn't already open. (This is
under Windows 95.) If it is, you get an 'access
denied' error.
So if the user clicks something in the parent window,
and the popup loses focus but remains open, then if
the user does something in the parent window to
trigger the function again -- error. I tried putting
onBlur="window.close();" in the popup document's BODY
tag, but with IE that made some very weird behavior,
although, ironically, it worked with NN. Yeeessh!
Any clues?
David Mintz
Spanish Interpreter, US District Court
Southern District of New York
http://panix.com/~dmintz/
__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices.
http://auctions.yahoo.com/
HWG: hwg-languages mailing list archives,
maintained by Webmasters @ IWA