This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes How to trap browser close button Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "How to trap browser close button" Watch "How to trap browser close button" New topic
Author

How to trap browser close button

Bharath Sundar
Greenhorn

Joined: Feb 19, 2009
Posts: 13
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

Joined: Jan 10, 2002
Posts: 63348
    
  70

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.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
ujjwal soni
Ranch Hand

Joined: Mar 28, 2007
Posts: 403
Hi,

Use a javascript function for that.


Cheers!!!
Ujjwal B Soni <baroda, gujarat, india> <+918866008962>
"Helping hands are better than praying lips......"
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 63348
    
  70

ujjwal soni wrote:Use a javascript function for that.

As there is no event triggered upon closing the browser, how will that help?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to trap browser close button
 
It's not a secret anymore!