This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes stop window from closing-urgent Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "stop window from closing-urgent" Watch "stop window from closing-urgent" New topic

stop window from closing-urgent

laxmi sri

Joined: Jun 26, 2004
Posts: 1
I have a IE window running a JSP page.When I click on window close button on the right side top, then it should display a alert box with ok and cancel.When I click cancel, the window should not be closed.How to stop that window closing event after you select cancel button in the alert.
can any one help me out please...
Eric Pascarello

Joined: Nov 08, 2001
Posts: 15385
for IE only, you can use onbeforeunload
I agree. Here's the link:
subject: stop window from closing-urgent
It's not a secret anymore!