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.

SpModal.open as alert in client script

Sraj1
Giga Contributor

How can i add link to the alert in client script?

In my script spModal.open is using to generate a alert in portal . i have to add link so that user can click on it and they can go to another page.

 

example of script:

if( answer == abc)

{

spModal.open({

message : Go to www.google.com,

title : Important:',

buttons:[{

label :'OK',

primary: true}}

));

}

In the message instead of the text i want to add a link. how can i get it done?

 

 

 

1 ACCEPTED SOLUTION

Pranesh072
Mega Sage

You can add anchor tags in the message like

var url = '<br><a href= "www.google.com" >Google</a>';

message : 'Go to' +url ,

View solution in original post

1 REPLY 1

Pranesh072
Mega Sage

You can add anchor tags in the message like

var url = '<br><a href= "www.google.com" >Google</a>';

message : 'Go to' +url ,