Welcome to Community Week 2025! Join us to learn, connect, and be recognized as we celebrate the spirit of Community and the power of AI. Get the details  

How to insert text in a popup GlideDialogWindow ? (Window create on script lient with setting 'onload')

srevinU
Kilo Contributor

Hello, 

Someone could tell me how can I insert some text in a GlideDialogWindow ?

There is my scripting from 'Client script':

function onLoad() {
   //Type appropriate comment here, and begin script below
	var gdw = new GlideDialogWindow('testWindow');
	gdw.setTitle('Test title window');
	gdw.render();
}

Where do I have to insert the text part ?

5 REPLIES 5

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

GlideDialogWindow opens an UI page;

that page can have text content

you already have title set using setTitle()

sample example below

https://www.servicenowguru.com/system-ui/glidedialogwindow-advanced-popups-ui-pages/

Mark Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur

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

Thank you for you return Ankur,

Okay for the title, as you saw already set. But what about other content ? I mean how can I include a text beneath the title ? 

 

Hi,

the title is set by using that function;

any content to be displayed in the DialogWindow has to come from the UI page

Did you check the link shared previously?

That should help you

Did you create a UI page with that name?

if not then create a ui page with name as test_Window and html as below

<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">

<p>My Content here</p>

</j:jelly>

find_real_file.png

update your code as below

function onLoad() {
   //Type appropriate comment here, and begin script below
	var gdw = new GlideDialogWindow('test_Window');
	gdw.setTitle('Test title window');
	gdw.render();
}

Mark Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur

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

Thank you for the reply and the details Ankur, it's working now 🙂