Hi
I want to perform Custom Alert instead of default.
Whenever user wants to navigate back to previous screen using browser's navigation arrow or if user want to close the browser or tab , at that time I want to show one pop up asking user "Are you sure you want to leave this page?". and based on the user click I want perform action
Currently I am using JS
window.addEventListener('beforeunload', function(event) {
// Cancel the event
event.preventDefault();
// Chrome requires returnValue to be set
event.returnValue = '';
// Show confirmation dialog
return confirm('Are you sure you want to leave this page?');
});
Hi Harbor V,
I have attached the Javascript code image, which is vanilla JS. You can try to implement it in Outsystems. I have attached the CustomJSAlert.oml file too for the reference.
Thanks,
Mayur