Found a working script on the internet, except that I can't change the message for FF. Which would be great. (Works for Chrome)
window.onbeforeunload = function(e) {
if(!e) e = window.event;
e.cancelBubble = true;
e.returnValue = 'You sure you want to leave?';
if(e.stopPropagation) {
e.stopPropagation();
e.preventDefault();
}
};
What ever, this works great. But I wanna do something when the user clicks on abort to keep visiting the page.
How I could do that?