SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Zealot
    Join Date
    Jun 2003
    Location
    Italy
    Posts
    112
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Confirmation for closing browser windows from php

    Hi,
    I have an application made by php (running on the the server PC); when I close the browser window from the php file (by the html script "window.close()" ). The browser send me a dialog window in order to say "the application is trying to close the browser window, do you confirm it?"
    I want avoid to have this confirmation question dialog window.
    I don't know if there is a php option (may be inside the php.ini), or an Internet Explorer option (but I didn't find it), or a Windows XP Pro option (register or something else, but I didn't find it).

    I noticed also that I don't get this dialog windows when the browser window is a full screen window.

    Thank You in advance
    Fausto

  2. #2
    Web-coding NINJA! silver trophy beetle's Avatar
    Join Date
    Jul 2002
    Location
    Dallas, TX
    Posts
    2,900
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Basically, that happens whenever scripting tries to close a window that has not been opened by scripting.

    There's a hack for it though. Make sure to notice it doesn't work on all browsers.
    beetle a.k.a. Peter Bailey
    blogs: php | prophp | security | design | zen | software
    refs: dhtml | gecko | prototype | phpdocs | unicode | charsets
    tools: ide | ftp | regex | ffdev




  3. #3
    SitePoint Zealot
    Join Date
    Jun 2003
    Location
    Italy
    Posts
    112
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank You very much, Beetle!!!
    I consulted the your link and the solution works properly.
    Bye,
    Fausto


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
  •