[thelist] JavaScript - closing parent window
Peter-Paul Koch
gassinaumasis at hotmail.com
Wed Dec 20 05:44:19 CST 2000
>hopefully a quickie JavaScript question! If I open a pop-up window, how do
>I
>both close that window and update the parent window at the same time. I'm
>trying variation on this:
>
><a href="#"
>onClick="parent.inside.location='motesbokning.asp?IDNum=1&for=Company+A';win
>dow.close();">Close</a>
>From the popup to the opening window/frame is 'opener'. So assuming the
popup was opened from the frame inside, simply do
opener.location.href = etc.
If the frame inside is a sibling of the frame that opened the popup:
opener.parent.inside.location.href = etc.
Go to the opener, then proceed as with normal cross-frame scripting.
ppk
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
More information about the thelist
mailing list