I'm having an issue in IE9 with onbeforeunload -- when the code below is run it repeatedly brings up a dialog asking if you want to stay or leave the page.
I modified my code to prevent default functioning based on this thread to no avail.
Any help on this would be much appreciated.
Code Sample:
window.onbeforeunload = function(e) {
e.preventDefault();
e.returnValue = false;
saveFormData();
return null;
}
function saveFormData() {
$.post("<?php echo site_url('resume/cleanup'); ?>", { resume_id: "<?php echo $this->session->userdata('resume_id'); ?>" } );
}