View Full Version : Close a pop-up window

sir sixx
07-16-2002, 09:46 AM

I need some help, please.

I have a HTML page that I'm loading into a javascript chromeless pop-up window from within a macromedia flash file.

The chromeless window does not have a title bar, so i want a hotspot on the web page to act as a button and close the pop-up.

So I have the hotspot with the code:

<area shape="rect" coords="392,23,412,43" a href="javascript:window.close()">

Now this works when i view the HTML page but will not work within the chromless pop-up. I think that the window.close needs to point to the root window but i have no idea what the correct code is to do this.

Can any one help

Thank you

Sir Sixx

07-16-2002, 09:50 AM
Well, in the parent window if you have given a name to the new window like "chromeWin"..............then in the parent window you can use chromeWin.close();

07-16-2002, 09:55 AM
try top.close()

sir sixx
07-16-2002, 10:00 AM

That works great.

Thanks for you help.