Stop the Form Submission onsubmit catalog client script AJAX
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā05-10-2024 09:06 AM
Hi
I am trying to stop form submission in onsubmit client script . I am using GlideAjax .
If I can't use getXMLWait() as it doesn't work in Portal.
I cant use g_scratchpad as it doesn't work in Native UI.
If I take a variable and make it true/false based on answer from ajax as suggested in many places even it doesn't work .
Need help !!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā05-10-2024 09:00 PM
This question is so often asked (did you you leverage the search function first before asking?) that ServiceNow has provided the answer with an example script: https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0779964
Based on that approach, you will find a more extensive version in the following article: https://www.servicenow.com/community/developer-blog/how-to-async-glideajax-in-an-onsubmit-script/ba-...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā05-11-2024 10:11 AM
Hi Maik, Thanks for the response
The problem which I already mentioned was g_scratchpad will not work for Native desktop , it works only for mobile/service portal . If I use getXMLWait() it will work on native , but getXMLWait() wonāt work on portal. Everyone in forum gave solutions for portal(using g scratchpad) and native UI (using getXMLWait()). But I am not supposed to use getXmLWait() .. Hope you understood my problem!!!
pls help
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā05-11-2024 10:35 PM
Hi Maik,
Thanks for the reply
But the problem was g_scratchpad wonāt work for native desktop , getXmLwait wonāt work in portal and also as per guide lines getxmlwait should not be used . Thatās the issue.
please suggest any other possible solution..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā10-22-2024 07:56 AM
Same problem, on my side.
Can't use the scratchpad or the XMLWait.
So can we have an update on this, before opening a ServiceNow case.