Link to home
Start Free TrialLog in
Avatar of keevin
keevin

asked on

Update Database when closing a window

HI,
Is there any code that can be use to update a database when the user close the browser. Also i need to display a message on the screen if the user is inactive for a certain time. If this time is exceeded then the system will log the user out.

I've use JavaScript onUnload/Onbeforeunload event
                    Problem
                         - It does not work properly
                         - Do not have control of current browser
                         - Does note work on Netscape
ASKER CERTIFIED SOLUTION
Avatar of Michel Plungjan
Michel Plungjan
Flag of Denmark image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of keevin
keevin

ASKER

I won't mind redesigning my server process.
I'm using coldfusion MX 7, is there any setting i need to adjust?
Right now when the user close his browser i session is terminated but i don't know how to update teh database as when the user login i update his status and samething when he logs out. This help me to keep track when the user last login.
Avatar of keevin

ASKER

This has already been implemented where the session is manage. Teh problem is how to update the database when someone leaves your website
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial