Page 1 of 1

How to disable warning before leaving the detail view form with unsaved changes

Posted: 2025-01-29 21:50
by mcvaidas
Hello, I don’t need this new feature in 24.19 (Warning users before leaving the detail view form with unsaved changes using beforeunload event.
) in my POS project. Is it possible to disable it for a specific detail view?

Re: How to disable warning before leaving the detail view form with unsaved changes

Posted: 2025-02-07 10:42
by mcvaidas
this is my solution (i added window.onbeforeunload = null;):

var dv = AppGiniHelper.DV;
var actionbuttons = dv.actionbuttons;
var group = actionbuttons.addGroup("", "", "highlight");
group.addButton(
"Tischplan",
function () {
window.onbeforeunload = null;
location.href = "tablemap.php";
},
Variation.Info,
""
);