How do I prevent the Stay/Leave pop up that appears on navigating away from the form?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-14-2016 03:01 PM
Hi all,
I have a requirement where if a value is changed on the form then take a confirmation - if yes, then reload the form (basically dont save anything) and if no, then set a flag and let user save the information.
Now, I know how to make it work using confirm("My message") alert BUT the out-of-box alert is adding the complexity. No matter what user select on my pop-up, the final decision is driven by this pop-up.
Is there a way to get rid (or control) of the above pop up that shows confirmation message "Do you want to leave this site?".
Any inputs are highly appreciated.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-14-2016 05:16 PM
I had this issue before
I had to install TamperMonkey extention on chrome and use this script
Block Exit Blockers User Script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-14-2016 06:15 PM
Hi Blaze,
Thanks for your response. What you've suggested is at the browser level and will be just for you and not for all the users. My use case is for a certain app and a particular requirement.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-09-2017 10:40 PM
Use the below statement in your UI page.
g_form.modified=false;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-13-2024 12:23 PM
Interesting but it doesn't work in the UI policy due to VA restrictions in the SP.