i have JS function window.onbeforeunload which returns a msg and browser shows that in confirmbox. Now how will i know whether user clicked on leave that page or stay on page ?
Javascript
window.onbeforeunload = function(e) {
return "Click STAY ON PAGE then SAVE to save any data you've entered.\n If you've already SAVED select LEAVE PAGE to continue.";
}