Win a copy of Emmy in the Key of Code this week in the General Computing forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

submit form when closing browser

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi;
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.

thanx
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just asked yesterday: https://coderanch.com/t/118009/HTML-JavaScript/Browser-Button

Eric
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
Thanks
 
Time is the best teacher, but unfortunately, it kills all of its students - Robin Williams. tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!