Originally posted by Reeti Saha:
Hi:
I'm using jsp for my web based project. I've written code for some clean up operation when a button is pressed..but I want the same method to be executed if a user closes the browser window also.
Pls. let me know how to proceed.
Regards
Reeti
It depends on the browser you are using.
close is an event just like leftClick or rightClick. You'll have to code the close event for each browser you want it to work on. Once you have identified how to capture the event, it's just a matter of having the javascript function take the browser to the page that does the clean up before it closes.
I expect it will be a bit tricky but it should be possible.