We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

UI page client script building HTML and pass it UI Page Div not working

Saranya Babu1
Tera Expert

@Ankur Bawiskar 

Hello All,

 

I want to create pop message in which I am using a UI page.

 

 

from this client script I am getting messages in html but its not displaying in UI Page

 

var body = gel("modal_body");
body.innerHTML = message;

 

 

This not working

 

 

 

 

 

 

 

 

 

2 REPLIES 2

Ankur Bawiskar
Tera Patron

@Saranya Babu1 

try this

var body = gel("modal_body");
body.innerText = message;

If my response helped please mark it correct and close the thread so that it benefits future readers.

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

I was not getting the message as string interpolation was not supporting in ServiceNow. When I used for loop it worked