HTML Tag in Confirm()

Charishma M
Tera Contributor

Hi All,

 

How can we write HTML tags to make text font color to 'red' and bold?

 

Eg:

var solution = confirm("Create Incident and Propose it to major incident and then add any incident to parent field");

 

In the above confirm msg i need to make entire text into 'red' color and "Propose it to major incident", & "add any incident" should be in bold too.

 

 

 

Thanks

2 REPLIES 2

Ankur Bawiskar
Tera Patron
Tera Patron

@Charishma M 

not possible with javascript prompt such as confirm, alert etc

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Ankur Bawiskar
Tera Patron
Tera Patron

@Charishma M 

check this library SweetAlert

It's freely available on Share:

https://developer.servicenow.com/app.do#!/share/contents/1320723_sweetalert_2?v=2&t=PRODUCT_DETAILS

Have a look at some examples here:

https://sweetalert2.github.io/

 

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader