PDA

View Full Version : Help: How to close window


chaneyj1
07-18-2002, 04:35 PM
Hi,

Just wondering if anyone knows how I can close a window from a page that didn't create the window.

As in.

Page 'A' opens a new window called 'B', then page 'A' does a redirect to page 'C'. From 'C' I need to close page 'B'.

I haven't been successful because once I redirect to 'C' I loose the object reference to page 'B'.

Any ideas?


Thanks in advance,

Jeremie

requestcode
07-18-2002, 06:53 PM
Once you do the redirect to page c from a you lose any conection to the new window. As far as know there is no way through JavaScript to close the new window from the main window when you redirect.

chaneyj1
07-18-2002, 06:55 PM
I found that all I have to do is open the new window again in the page and then do a close(). If you do a open and the window is already open is just does a refresh but gives you a reference to the window object.

Works perfect. Thanks.

Jeremie