- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-04-2016 07:59 AM
Hi All,
We are using standard javascript(underlined) alert which gives the below pop up message when i click on certain application. Is there any way i can make this pop up message more fancier, it should look good and i want to insert my company's logo in the popup message. I am currently on Eureka version.
for(var j = 0; j< selectedOptions.length; j++){
if(selectedOptions[j].value == '8ed97438d8121a40c64c9be40e87a4b8'){//check for Consultant Pharmacist Package
moveSelectedOptions(selectedIDs, rightBucket, leftBucket); //move the options
alert("Selecting this option will move certain Applications to Right side bucket as a Package.");  //remove none option from right
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-04-2016 08:54 AM
Here are the steps to install SweetAlerts (just tested it in my developer instance):
- Download SweetAlerts from ServiceNow Share (you'll need to login with your HI credentials / register if you've never used it before)
- The file saved will be called: SweetAlerts-V1.1.XML
- Once you have the XML file, you can import it from any table using the "Import XML" function in list view:
- I did this on "Retrieved Update Sets" since this is where the update set will appear after the import.
- Once the file is imported, you will see a new entry on "Retrieved Update Sets" called "SweetAlerts-V1.2" in a state of "Loaded"
- Preview and Commit the Update Set. It will add 4 new items to your instance:
- Style Sheet (SweetAlert.css)
- Schedule Item (Share Install Logger) -- Marks that you've installed something from share, as to give the original author credit
- UI Script (globalsweetalerts)
- UI Script (SweetAlerts-min)
- I did this on "Retrieved Update Sets" since this is where the update set will appear after the import.
I tested this in a Geneva instance, but have used it in Fuji as well. Since its essentially Javascript hanging out in a UI Script, there shouldn't be any problems with it running in Eureka.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-04-2016 08:38 AM
Rahul,
You can install SweetAlerts from ServiceNow Share:
SweetAlert - a beautiful replacement for javascript's "alert"
Link Directly to Share:
That will give you a lot more options on the look/feel of your alert boxes, including being able to insert a custom image into the alert. There's also a GitHub link below for the original code that outlines some of the cool things you can do (and has useful syntax examples):
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-04-2016 08:43 AM
Hi Mike,
Thanks. How can we install this sweetalert on my serviceNow webpage? i am currently on Eureka version.
Do we have any predefined steps?
Thanks,
Rahul kathuria
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-04-2016 08:54 AM
Here are the steps to install SweetAlerts (just tested it in my developer instance):
- Download SweetAlerts from ServiceNow Share (you'll need to login with your HI credentials / register if you've never used it before)
- The file saved will be called: SweetAlerts-V1.1.XML
- Once you have the XML file, you can import it from any table using the "Import XML" function in list view:
- I did this on "Retrieved Update Sets" since this is where the update set will appear after the import.
- Once the file is imported, you will see a new entry on "Retrieved Update Sets" called "SweetAlerts-V1.2" in a state of "Loaded"
- Preview and Commit the Update Set. It will add 4 new items to your instance:
- Style Sheet (SweetAlert.css)
- Schedule Item (Share Install Logger) -- Marks that you've installed something from share, as to give the original author credit
- UI Script (globalsweetalerts)
- UI Script (SweetAlerts-min)
- I did this on "Retrieved Update Sets" since this is where the update set will appear after the import.
I tested this in a Geneva instance, but have used it in Fuji as well. Since its essentially Javascript hanging out in a UI Script, there shouldn't be any problems with it running in Eureka.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-17-2016 10:26 AM
Hey MIke,
I installed this on my Geneva instance and for whatever reason, my console is not recognizing 'parent.swal':
Both UI Scripts are set to 'global>true'
Any tricks that I'm missing here? I can give you access to my dev instance if you want to take a look-
Thanks
I'm thinking this might be the culprit: