• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

javascript sending a request

 
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,..

I need some help on this.. i am not a javascript expert

IS there a way that you can send a request to Servlet from javascript??
If so, please let me know. I appreciate your help on this matter.

This is my issue,.. presently working on an intranet application, where users do not log off but close the browser, i do not want to use session time-out and HttpSessionListener to handle removing the session on the server.. because for some reasons we are putting a big value for time-out .. so somehow with a cool javascript i can detect a browser close and ,.. in the javascript when a browser is closed i want to send a request to a servlet which handles the Log Off, .. which in other words .. i want to clear the session on the server even if a user closes the browser, by detecting browser close and then sending a request to servlet..

All the users use IE , so i have no problem to check if this javascript is working fine in all browsers or not...

Thanks again for your help.

PS: this is the link to the javascript for detecting browser close and atleat it is working fine with IE
http://www.jguru.com/faq/view.jsp?EID=1211863
[ October 28, 2005: Message edited by: Bear Bibeault ]
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
take a look at onbeforeunload.

Eric
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic