want to set message using URL

abirakundu23
Mega Sage

Hi All,

I want to set URL through alert () message or showfieldmessage(). its means if message shows "CLICK Here" it will redirect to different page. for me alert () message shows URL & all instead of only word.

 

can we achieve by alert () or showfieldMessage().?

we have used addInfomessage() but its only visible for 4 secs post that the message gone. Our customer want it will be still visible until they will click "X" mark. is there any alternative way-out?

2 REPLIES 2

akash_avasare
Tera Expert

Hello @abirakundu23,

 

To implement desired functionality, Please use the following Client Script -

 

g_form.addInfoMessage('<a href="https://www.servicenow.com/community" target="_blank"> Click Me </a>');
 
This info message will remain visible for the duration of the page's validity.
 
Thanks.

 

abirakundu23
Mega Sage

Hi @akash_avasare ,

I have used already similar approach but problem here is message automatically gone after 4 secs. Any alternative do we have display message.