I\'m trying to implement a basic popup window that asks the user if they really want to leave a page, similar to what would happen on this site if I tried to close the windo
At the head:
...
In the two links allowed to leave, you can add
onclick="disabledConfirm_exit=true;"
And inside the confirm_exit
function confirm_exit(e) {
if(disabledConfirm_exit) return;
if(!e) e = window.event;
e.cancelBubble = true;
e.returnValue = 'Are you sure you want to leave?';
if (e.stopPropagation) {
e.stopPropagation();
e.preventDefault();
}
}