Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Jul 2002
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Close a pop-up window

    Hello,

    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:
    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

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Location
    Mumbai, India
    Posts
    218
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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();

  • #3
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,032
    Thanks
    0
    Thanked 248 Times in 245 Posts
    try top.close()

  • #4
    New Coder
    Join Date
    Jul 2002
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Simple.

    That works great.

    Thanks for you help.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •