Onsubmit client script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-17-2024 02:00 AM
Hi All,
This is for a service catalog, on submit, a popup message should display with yes and No buttons. On clicking yes it should be submitted, when No is clicked it should be redirected to a different item. Can you help with the script part?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-17-2024 02:18 AM
@ThenmozhiA Please refer to this thread https://www.servicenow.com/community/developer-forum/confirm-box-using-client-script/m-p/1430048 to know how confirm box can be utilised in this case.
Hope this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-17-2024 02:31 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-17-2024 05:03 AM
Thanks but i need the pop up message to have yes and No buttons, upon clicking yes it should redirect to another link and upon No the request should be submitted.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-17-2024 05:06 AM
You could use something along these lines..
Sample Script:
function onSubmit() {
var confirm = confirm("Did you submit form 104333?");
if (confirm == false) {
return false;
}
}