aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes Pop up an alert or confirm message when the browser is closed Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Pop up an alert or confirm message when the browser is closed" Watch "Pop up an alert or confirm message when the browser is closed" New topic
Author

Pop up an alert or confirm message when the browser is closed

ravisha andar
Ranch Hand

Joined: Feb 25, 2011
Posts: 55
Hi All,

I want to pop up a question(alert) when the window(that is browser ) is closed.
Once the user accepts or clicks on "Yes" the the browser needs to be closed.

Can anybody help me with this.

Any help is highly appreciated !!!

Thanks
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61661
    
  67

Not a JSP question at all, so I've moved this to HTML forum.

And if you search around, you will see that the answer is :you can't". There is no reliable way to trail that the browser is being closed.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
window.confirm

Gets prompted for more than closing the windows and there really is no way to detect it.

Eric
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Pop up an alert or confirm message when the browser is closed