I've less knowledge on JavaScript/JQuery I got snippet to get alert when i press browser 'X' button. code is below,
window.onbeforeunload = function (e) {
if(unsavedState){
e = e || window.event;
if (e)
e.returnValue = 'Data you have entered may not be saved.';
return 'Data you have entered may not be saved.';
}
};
But the problem is customer not happy with the browser giving pop-up he want custom pop-up, when i change any thing in the above code that is not working. Please help on this. browser are Firefox, Chrome and IE 8 and above.
I'm attaching Screenshot(Firefox).
Thanks.