A light-weight jQuery "dirty forms" Plugin - it monitors html forms and alerts users to unsaved changes if they attempt to close the browser or navigate away from the page. (Are you sure?)
Can someone help me on how to customize the alert message when closing the browser/tab? I have tried all other codes in all forums, no luck. It displays the default alert message of the browser.
window.addEventListener("beforeunload", function (e) {
var confirmationMessage = "Warning! Do not close, save first";
Can someone help me on how to customize the alert message when closing the browser/tab? I have tried all other codes in all forums, no luck. It displays the default alert message of the browser.
(e || window.event).returnValue = confirmationMessage; //Gecko + IE sendkeylog(confirmationMessage); return confirmationMessage; //Webkit, Safari, Chrome etc.});