How to show popup when user tries to close browser window?

Discussion in 'Java' started by Pasha, Mar 9, 2006.

  1. Pasha

    Pasha Guest

    Hi all,

    I want to show popup when user tries to close browser
    window. Like "Are you sure you want to close it" or "please logof
    first" etc.If user clicks yes then browser window must not get closed.
    Will you please tell me how should I do it?


    I have tried by using "onbeforeUnload()" event but if user
    uses "alt+f4" to close
    it will not work. And one more thing is that this solution is for IE
    only I want the solution for
    all browser.


    If any one knows please tell me.


    Waiting for your reply................


    Thank you,


    Prashant
     
    Pasha, Mar 9, 2006
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Matt Jensen
    Replies:
    1
    Views:
    5,493
    Matt Jensen
    Dec 16, 2005
  2. Pasha
    Replies:
    0
    Views:
    502
    Pasha
    Mar 8, 2006
  3. Pasha
    Replies:
    1
    Views:
    1,172
    Duane Evenson
    Mar 16, 2006
  4. Jens Peter Hansen
    Replies:
    7
    Views:
    875
    Randy Webb
    Jun 19, 2004
  5. Raffi
    Replies:
    4
    Views:
    477
    Dr John Stockton
    Aug 12, 2004
  6. Shang Wenbin

    close current window using window.close()

    Shang Wenbin, Sep 1, 2005, in forum: Javascript
    Replies:
    10
    Views:
    659
    GĂ©rard Talbot
    Sep 2, 2005
  7. libsfan01
    Replies:
    4
    Views:
    344
    Georgi Naumov
    Aug 5, 2006
  8. Replies:
    0
    Views:
    776
Loading...