Stop Propagation event doesn't seem to work in JavaScript? -
function confirmexit(e) { var f = formchanges(); //checking whether page has been modified or not if (f.length > 0){ if (submitform == false) { if(!e) var e = window.event; //e.cancelbubble ie , work e.cancelbubble = true; e.returnvalue = "you have made updates page have not been saved."; //e.stoppropagation firefox doesn't work. if (e.stoppropagation) { e.stoppropagation(); e.preventdefault(); } } settimeout("enablebeforeunloadhandler()", "100"); } } //ignore window.onbeforeunload=confirmexit; function enablebeforeunloadhandler() { window.onbeforeunload=confirmexit; }
the page redirecting page without waiting user action when alert message displayed whether save data or not.anyone know anything?
Comments
Post a Comment