I\'m building a fail safe for my form that is going to warn users that if they leave the page their form data will be lost (similar to what gmail does).
window.
You may remove and re-assign the onbeforeunload when hovering those links:
jQuery(
function($)
{
//store onbeforeunload for later use
$(window).data('beforeunload',window.onbeforeunload);
//remove||re-assign onbeforeunload on hover
$('a[href^="javascript:"]')
.hover(
function(){window.onbeforeunload=null;},
function(){window.onbeforeunload=$(window).data('beforeunload');}
);
}
);