Leaving a WebPage ... sure?
I have been looking around today for a working example of code, which I can use in my HTML page to capture when a user has clicked the [X] at the top right, or has clicked to go to another website.
All of the examples which I have found use the onbeforeunload to pop a "Are you sure?" box, which is great, except that we're then prompted everytime we navigate from one page to another or perform a postback.
Can anyone advise either how I can just capture when the user is closing the browser or navigating to a page away from my domain?
Much appreciated.
__________________
Regards,
Sean
|