File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "stop window from closing-urgent" Watch "stop window from closing-urgent" New topic
Author

stop window from closing-urgent

laxmi sri
Greenhorn

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
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
for IE only, you can use onbeforeunload
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: stop window from closing-urgent