PDA

View Full Version : onbeforeunload in all browsers



CoffeeRain
December 16th, 2011, 06:41 PM
Is there a way to use onbeforeunload in all browsers? I have a webpage and I want to display usernames of the people online. When they close the window, I want change the value in a mysql column by redirecting them to offline.php. Is there a way for this to work no matter what browser is being used? I don't want someone stuck on the website forever. :)