I was wondering if anyone knows if there is a built in PHP function that checks if a page has been left? I want to use this on a admin page that I'm working on that has a bunch of editable text fields....if someone clicks on another link or clicks the back button, I want to have a warning pop up that asks if they want to update the page or if they really meant to leave the page.
Any help would be greatly appreciated. Thanks
For client-side dialogs, use:
<BODY onUnload="javascript:verifyToUser()">
Of course, you'll need to write a Javascript function called verifyToUser() in order to do it.