A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: window.close

  1. #1
    Junior Member
    Join Date
    Mar 2001
    Posts
    13
    I've got a fullscreen movie and want to add a button to let users quit from it. Just checked from recent posts and found the following script:

    getURL ("javascript:window.close()");

    This script works but there will be a pop-up message from IE asking you if you really want to quit. How can I avoid this pop-up message?


  2. #2
    Just Surfin'
    Join Date
    Jan 2001
    Posts
    40
    I'm no expert on this, but I was told that it works like this;

    - If the window that you are trying to close is opened by a link from your site, then you won't get the message because the window is "owned" by the page that called it.

    - If you try to close the main window which was opened by typing a URL in the address bar or was opened from another site, then window does not have an owner, so it checks that you really want to close it by giving the pop-up message.

    Hope this helps.

    Rich.



  3. #3
    Senior Member
    Join Date
    Jan 2001
    Posts
    591
    You can't.
    As long as the page contains a history, you will get an error. So if you just open your page and test it, it will work fine. But if you came there from another page, either on your server or from a search engine or whatever, you will get the annoying error message. There's no way around it. Sorry

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center