How to insert text in a popup GlideDialogWindow ? (Window create on script lient with setting 'onload')
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2019 06:15 AM
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 ?
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2019 03:54 AM
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
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-22-2019 12:44 AM
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 ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-22-2019 03:09 AM
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>
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
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-25-2019 05:08 AM
Thank you for the reply and the details Ankur, it's working now 🙂