user-unfriendly onbeforeunload / onunload
I'm struggling with onbeforeunload, onunload and generating the right messages at the right time. Any idea welcome. This is the situation: when I use onbeforeunload, the user gets a message to choose whether to navigate away, but I can't turn it off - the message is standard and appears regardless what's in the event handler. when I use onunload, I can control the "bye" messages that occur, but I cant offer the user the opportunity to change their mind. So for example, if there is data to save. With onbeforeunload, a message pops up, -regardless of the state of the user's data- asking if they