Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Professional For advanced ASP.NET 1.x coders. Beginning-level questions will be redirected to other forums. NOT for "classic" ASP 3 or the newer ASP.NET 2.0 and 3.5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 12th, 2006, 04:07 AM
Registered User
 
Join Date: Aug 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to hemal_301080
Default Database update on window close

Hello
I am having one problem.
I ask user to login and when they are correct, i change their loginstatus in database.
Now my problem is when they close the internet explorer by X button, i am not able to update loginstatus in database.

Is there any way i can change loginstatus at the time of close of Explorer X button?
I dont want to use any popup window as it will be blocked.

Hemal

 
Old August 12th, 2006, 02:34 PM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

There is another thread somewhere on this board with the same question, but I think the best resolve to have the user automatically logged out is to check for BeforeBrowserClose (i think that is the event) which will fire as the browser window is closing...problem is it only works with IE.

If it doesnt have to be so automatic and you can have about a 15 min delay, you can wait until the users session times out and update the flag in your database then.

hth

"The one language all programmers understand is profanity."





Similar Threads
Thread Thread Starter Forum Replies Last Post
Window.close muthuprakash83 Javascript How-To 0 August 7th, 2006 12:35 PM
window.close() failing to...well...close! mheathcote Javascript How-To 2 October 31st, 2005 03:02 PM
Controling Window.Close( ) vijay_rb ASP.NET 1.0 and 1.1 Basics 7 September 29th, 2004 05:55 AM
Close Parent window on opening child window pkdev Javascript How-To 8 April 11th, 2004 12:06 PM
How do i close pop-up window?: window.close () Burton HTML Code Clinic 2 September 8th, 2003 05:40 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.