Message when closing window
How to show alert message on ZEN when user closing window?
Standart js way to add listener is not working.
I tried this
ClientMethod onloadHandler() [ Language = javascript ] { zenPage.window.addEventListener('onbeforeunload', function(e){ return 'Are you sure you want to leave?'; }); }
and this, but both are unsuccessfully .
ClientMethod onloadHandler() [ Language = javascript ] { zenPage.window.onbeforeunload = zenPage.myClientMethod; }