Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

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

Exactly...ServiceNow will not let you use =>

You and I are in the same boat. thanks for the URL. I'll see if I can figure out how to fit it in to that promise call and will post here if i figure it out. Hope you do the same.

 

 

 

 

Nitin_NOW
Tera Guru

Just a quick check, the sweetAlert2 is compatible on Istanbul and Kingston versions? We are currently on Istanbul and moving to Kingston very soon. But I'm going to try this out in Istanbul first.

Please let me know.

Regards!

Matt Saxton - G
Kilo Guru

Matt Saxton - G
Kilo Guru

Hi Folks, Blast from the past! I have updated SweetAlerts and it works with all versions of ServiceNow. I also incuded some demo's along with a JSValidator fix to skip those annoying warnings. 

 

Link to share 

 

Paul Curwen
Giga Sage

Nice one thanks Matt.

***If Correct/Helpful please take time mark as Correct/Helpful. It is much appreciated.***

Regards

Paul