Confirm box with Yes / No buttons instead of OK / Cancel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-01-2013 11:30 AM
I am using return confirm("Are you sure...."); I want to specify Yes and No buttons instead of OK and Cancel. I am wondering if there is a simple way to do this within the scope of standard service-now tools. I cannot seem to find one.
This is pretty simple to do other places, outside of service-now, however I cannot seem to find a straightforward way to do it within service-now.
I'm sure the answer is simple. I just don't want to reword the question telling the user that OK means Yes and Cancel means No, nor do I want to tell them to Press OK if they have done such and such...
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-14-2013 11:53 AM
Hi Gary,
Not really. The confirm box is controlled by JavaScript, not ServiceNow. There are some tricks to get what you're looking for but they wouldn't be easy to execute within the realms of ServiceNow.
Please take a look at http://stackoverflow.com/questions/6445946/display-yes-and-no-buttons-instead-of-ok-and-cancel-in-confirm-box for examples of how to change the button text. It would likely require you to build a separate function and CSS page to hold the buttons you want to ask.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-14-2013 12:03 PM
Right, I was afraid of that. We just reworded the question. Not quite what I was hoping for, but it worked.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-12-2020 05:50 AM
Hello,
how did you achieved this?
Could you please post the solution

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-05-2017 11:48 PM
HI Gary,
Please go through:
https://www.servicenowguru.com/scripting/client-scripts-scripting/javascript-popup-boxes-servicenow/
https://www.w3schools.com/js/js_popup.asphttps://www.w3schools.com/js/js_popup.asp
Please hit like you like it.
Thanks
Sandeep