HTML Field on catalog item - prevent leave page modal
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
52m ago
Hello,
I have an HTML variable that is updated via a Catalog UI Policy. An ajax call is utilized to get a URL from the server and format that as HTML code that is displayed to the end user in the catalog item. When the user clicks the link it takes them to another page or catalog item in the Employee Center. I would like to stop the 'Leave page' modal from appearing and have the current tab take them to the destination.
After doing some research I have attempted the following but none have solved the issue:
1) After the HTML variable is updated with g_form.setValue, I added '
top.window.onbeforeunload = null;' to the script.
2) Set g_form.modified=false.
3) Modified system property glide.ui.dirty_form_support from true to false. While this does resolve the issue with the portal it introduces another problem with users modifying a record via a form. If someone changes a value for a field and doesn't save the record, leaving the form no longer warns the user.
I have tried creating a URL variable and updating that via an ajax call but clicking the link opens a new tab. Does anyone have any other thoughts or ideas I can try?
Thanks,
Peter
0 REPLIES 0