[thelist] Javascript: tricky closing of window
Candace Maynard
Candace.Maynard at popart.com
Tue Feb 6 19:02:34 CST 2001
Hi!
My understanding was that his need was to close the
window that opened the popup. I have successfully
used "window.parent.close();" for this operation.
(After looking it up, I note that point of window.parent
was to work with frames. So.. I don't know why it
worked for me with popup windows, I just know it did.)
I have also used window.parent.location="somehref.html" to communicate
with the window that opened the popup. P'raps it's better to
use window.opener. A few people on the list - and the O'Reilly
textbook - agree that window.parent is fer frames and window.opener
is for popups. Okay. But it worked for me.
:)
Candace
I think you're mistaken about this. Using window.parent within a
pop-up window will return the name of the pop-up window itself. You need
to
use window.opener in order to communicate with the window that spawned
the
pop-up. At least that's true in IE, Netscape 4.x, and Netscape 6.
James Aylard
---------------------------------------
For unsubscribe and other options, including
the Tip Harvester and archive of TheList go to:
http://lists.evolt.org Workers of the Web, evolt !
More information about the thelist
mailing list