The CreatorCon Call for Content is officially open! Get started here.

SweetAlert - a beautiful replacement for javascript's "alert"

Matt Saxton - G
Kilo Guru

 

SweetAlerts2 is out. 

 

SweetAlerts2

 

Hi Dev's,

 

Last night i was working on an application that needed some input. So i used SweetAlerts on the custom UI page and it turned out really nice looking, and i thought i could use globally!.

 

ServiceNow Share - SweetAlert

 

Once you install you can do any of the tests via the console

 

parent.swal({     title: "Are you sure?",     text: "You will not be able to recover this imaginary file!",     type: "warning",     showCancelButton: true,     confirmButtonColor: "#DD6B55",     confirmButtonText: "Yes, delete it!",     closeOnConfirm: false }, function(){     swal("Deleted!", "Your imaginary file has been deleted.", "success"); });

 

Make sure that you use "parent.swal()"

 

Here's more examples listed here SweetAlert

 

Screenshot's below.

 

2015-10-01 13_48_38-ServiceNow.png

 

2015-10-01 13_37_06-ServiceNow.png

44 REPLIES 44

Nic Omaha
Tera Guru

This is a great product! Does anyone have any instructions on installing in Service Now? Appreciated!


I found this site with some instructions and examples.



GitHub - t4t5/sweetalert: A beautiful replacement for JavaScript's "alert"  


I did download it and there isn't a xml file or any clear way to install it. I guess that's why question.


Nicholas,



I just tried it and i got the XML file should be SweetAlerts-V1.1.xml