Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to trap browser close button

 
Bharath Sundar
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I need to trap the IE's close button. I have a pop up, but when closing the popup the parent window is getting refreshed with an action which was supposed to be called when I hit the submit button in the pop up.

Can any one help how to trap the IE's close button so that i can stop the parent window getting refreshed with the action to be stopped through a java script.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65115
89
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please take the time to choose the correct forum for your posts. This forum is for questions on JSP.

For more information, please read this.

This post has been moved to a more appropriate forum.

 
ujjwal soni
Ranch Hand
Posts: 403
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Use a javascript function for that.

 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65115
89
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ujjwal soni wrote:Use a javascript function for that.

As there is no event triggered upon closing the browser, how will that help?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic