This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • 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
  • 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: 65229
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • 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
  • 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