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 Executing a function before window.close Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Executing a function before window.close" Watch "Executing a function before window.close" New topic
Author

Executing a function before window.close

PavanPL KalyanK
Ranch Hand

Joined: Feb 28, 2009
Posts: 212

Hi to Ranchi members

I have a button , and on the click of this window will be closed . I need to execute some function before the window closes . How can i ?


<input type=button value="Close Me" Onclick = window.close()/>

How can i achieve this ?

Please help

Balu Sadhasivam
Ranch Hand

Joined: Jan 01, 2009
Posts: 874


Pavan,

Call a function instead of window.close() and include your statements there inside the function() and at the end provide window.close()


something like this
PavanPL KalyanK
Ranch Hand

Joined: Feb 28, 2009
Posts: 212
Thanks a lot
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Executing a function before window.close
 
Similar Threads
How To Close Parent Window?
Open a window on close of main window
How do I use time intervals??
Event not getting called before window close
Closing window