Meaningless Drivel is fun!
The moose likes HTML, CSS and JavaScript and the fly likes submit form when closing browser 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 "submit form when closing browser" Watch "submit form when closing browser" New topic

submit form when closing browser

Kieth Nogins

Joined: Mar 10, 2006
Posts: 18
Is there a way to submit a form when the user closes the browser?
I want to be able to know when a user terminates his session by manually closing the browser.

Eric Pascarello

Joined: Nov 08, 2001
Posts: 15385
Just asked yesterday:

karthi karthi

Joined: Jun 02, 2006
Posts: 1
Hi , I am also facing the same problem. after pressing the "Cancel" button from the .jsp file I want to remove the session attributes from servlet. so I submit the form to a servlet(where i remove the session attributes) and then coded the script window.close().

Window has closed.

But from servlet I am getting the exception as
"weblogic.utils.NestedRuntimeException: Cannot parse POST parameters of request:" If you have an idea please give it advance.
I agree. Here's the link:
subject: submit form when closing browser
jQuery in Action, 3rd edition