- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2017 01:22 PM
Hi, I'm currently using SweetAlert which is available from Share as an Update Set from:
SweetAlert 2 is now available from Share:
it has a few extra features I'd like to use, just can't get it working in ServiceNow
Any advice appreciated,
Regards,
Paul.
Regards
Paul
Solved! Go to Solution.
- 6,567 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2019 01:16 AM
Hi jralph
I now have it all working in both London and Madrid.
The Update Set I've used is v2.3 which is available form Share here:
No extra config was required just installed the Update Set and works a treat. Finally I can use Question marks 🙂 Some of the new features are great, a big improvement on Sweet 1
I've only used it in Chrome so if you are using it in IE11 you may have issues according to the comments from other on the Share page.
You will also find the resources here useful: https://sweetalert2.github.io/
It comes with a great sample table as well:
Regards
Paul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2019 08:37 AM
I recently installed it and can't get it to stop auto closing after a couple of seconds.
Please help.
June
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2019 11:15 AM
After spending 2 days trying to get the alert from not auto-closing, I gave up. I went back to the standard one.
I don't know if it has to do with "promise" or what.
Maybe someone can help.
J
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2019 01:16 AM
Hi jralph
I now have it all working in both London and Madrid.
The Update Set I've used is v2.3 which is available form Share here:
No extra config was required just installed the Update Set and works a treat. Finally I can use Question marks 🙂 Some of the new features are great, a big improvement on Sweet 1
I've only used it in Chrome so if you are using it in IE11 you may have issues according to the comments from other on the Share page.
You will also find the resources here useful: https://sweetalert2.github.io/
It comes with a great sample table as well:
Regards
Paul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2019 12:24 PM
I think it does have to do with Promises, whatever those are. I don't think ServiceNow supports =>.
So instead of:
then((result) => {
I replaced it with:
then(function(result) {
And it works in the UI Action I was working on. Now I can't get it to work in an onLoad Client Script. The alert comes up just fine, but clicking the OK button does nothing.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-06-2019 03:54 AM
Worked out why we are having these issues. Promises support and arrow function (=>) were introduced in ECMAScript 6 (2015). ServiceNow is still using ECMAScript 5 (2010) so we just need to revert to good old fashioned functions for the callbacks for now.
Interestingly the ServiceNow code checker will complain at the use of ECMAScript 6 syntax such as let, const, promsie and =>etc, but Chrome will still interpret these and works. IE11 will not as IE11 neither supports arrow functions nor native Promises.
Regards
Paul