SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Zealot
    Join Date
    Mar 2005
    Posts
    166
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    window.close prompt message on IE7

    Hi guys,
    Any clue on how to get rid of confirmation message that the IE shows while trying to close a window?

  2. #2
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,800
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    To get rid of that prompt in IE you have to open the window from JavaScript in the first place.

    IE is the only browser to display that prompt. All other browsers just completely ignore requests to close windows from JavaScript if the site didn't open the window from JavaScript in the first place because your visitor's do NOT want you closing their browser from your web page as their browser may have several other sites open in separate tags and is NOT a part of your page.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  3. #3
    SitePoint Zealot
    Join Date
    Mar 2005
    Posts
    166
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by felgall View Post
    To get rid of that prompt in IE you have to open the window from JavaScript in the first place.
    Understood,
    the self.close() on my page isnt working because im not openning the window via js. Infact im using an automate tool to generate reposrts via e-mail to the users daily, and it uses http://address command and theres no support for window.open on it.
    Any suggestion on how to workarround this scenario?


Bookmarks

Posting Permissions

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