File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
ravisha andar
Ranch Hand
Posts: 55
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64181
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
window.confirm

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

Eric
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic