Hi All
I have a website that uses a database that is also being accessed by in-house personnel over a network.
On the website when a user logs in I set intstatus in the database to 1 so that internal personnel can see that the account is currently being updated on the web and when the user clicks on the logout link I set intstatus back to 0.
My problem is how to set intstatus to 0 if the user either closes their browser or browses to a different web page, I thought of using a simple onunload event that redirects to a page that sets intstatus to 0 and then closes itself however this fails because the onunload event triggers even when the user clicks on a link to another page within the website.
To summarise I’m really looking for a way to activate a script if the user a) closes their broswer or b) goes to an external website.
Any help at all greatly appreciated.