- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2019 11:28 AM
I have an onchange redirect that is triggered when a user selects a specific value from a list. Recently a popup began appearing that asks if the user is sure they want to leave. I've tried using g_form.modified but it hasn't had an effect on the issue. Does anyone have any recommendations? I've also tried disabling this sys property glide.ui.dirty_form_suppor
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2019 12:49 PM
Give this a try.
g_form.clearValue('impact');
g_form.clearValue('comments');
g_form.clearValue('category');
top.window.onbeforeunload = null;
top.window.onunload = null;
top.window.location = 'YOUR URL HERE';
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2019 11:41 AM
Is this on a catalog item (form) or record? Basically you would need to find what fields were modified and clear the values before the redirect. This will prevent the message.
If you want to keep the values (for example on a record), you can try g_form.save() before the redirect which should also prevent the message from coming up.
Hope that helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2019 12:00 PM
Unfortunately, I'm still getting the pop up even after clearing the values as seem below:
g_form.clearValue('caller_id');
g_form.clearValue('short_description');
g_form.clearValue('category');
g_form.clearValue('description');
g_form.clearValue('contextual_search_results');
top.window.location = "/help?id=help_sc_cat_item&sys_id=dd46bcc313f7ab00a757fa82e144b0b5";
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2019 12:49 PM
Give this a try.
g_form.clearValue('impact');
g_form.clearValue('comments');
g_form.clearValue('category');
top.window.onbeforeunload = null;
top.window.onunload = null;
top.window.location = 'YOUR URL HERE';
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2019 11:48 AM
Worked! Thanks!