Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trapping for Browser window close using X button

Status
Not open for further replies.

MaeJams

Programmer
Apr 24, 2001
51
US
Does anyone know a good way to trap for the Browser Window closing? I need to put some additional "logging-off" code in a suitable location to log users off of a server (other than the web server). I can't put this code in the Window_OnUnload of the main page in my web app, as this fires anytime the page reloads with new content. I have the code duplicated in the Session_OnEnd of the Global ASA file, but that event does not fire when the Browser Window is closed using the X button.
 
I would try posting this over in the javaScript forum. jaredn (one of the members over there) is very good with event capturing, so if it can be done, I would bet he would know how --

:)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top