Forum Moderators: open

Message Too Old, No Replies

Closing a pop window

Closing a pop window

         

anubis

9:21 am on Sep 23, 2002 (gmt 0)

10+ Year Member



Hi
I have a pop up window with a href link which opens a page in the parent browser windows frameset. This works fine but what I want to do is when the user hes clicked on the link I want the pop window to load the page as it does now but close as well.
Below is the script as i have it now, does anyone have any ideas as to how to modify it to close the pop window as well?

<a href="#" onClick="window.opener.parent.content2.location='whats_new.html';">CLICK
HERE FOR MORE DETAILS</a>

cheers

joshie76

9:26 am on Sep 23, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



onClick="window.opener.parent.content2.location='whats_new.html';window.self.close();">

Sinner_G

9:33 am on Sep 23, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Won't the browser show an alarm when a window tries to close itself?

tedster

9:49 am on Sep 23, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Not if the window was originally opened by javascript - like the pop-up window in this case.

anubis

11:10 am on Sep 23, 2002 (gmt 0)

10+ Year Member



cheers joshie that worked fine.

anubis