- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2025 03:19 AM - edited 01-22-2025 03:21 AM
I'm struggling with this one, I have a UI Page which is triggered from a client script which works a treat however I'm trying to remove the close declaration from the header but cant seem to get it to work.
I've tried, Solved: Re: Remove the Close X on Glide Dialog window / UI... - ServiceNow Community however I just get an error message stating its not a function.
Any help would be greatly appreciated.
// On change client script
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}
var active = g_form.getValue("u_active");
if (active == "false") {
var dialog = new GlideModal('UI_PAGE');
dialog.setSize('wide');
dialog.render();
}
}
//UI PAGE
<?xml version="1.0" encoding="utf-8"?>
<j:jelly trim="true" xmlns:j="jelly:core" xmlns:g="glide">
<g:ui_form>
<table class="wide">
<tr>
<td nowrap="nowrap" align="right">
<img src="lockblue.png" width="30" height="30"/>
</td>
<td nowrap="true">
<strong>Deactivation Warning</strong>
</td>
</tr>
<tr>
<td></td>
<td>
<p style="color: rgb(0, 0, 0); padding-bottom: 10px;">
(Contents Line 1)
<p style="font-weight:bold; color: rgb(204, 0, 0); padding-bottom: 10px;">
(Contents Line 2)
</p>
</p>
</td>
</tr>
</table>
<!-- Buttons -->
<div style="text-align: center; margin-top: 20px;">
<button type="button" onclick="window.location.reload();" style="padding: 10px 20px; background-color: #d9534f; color: white; border: none; border-radius: 5px; cursor: pointer; margin-right: 10px;">
Cancel
</button>
<button type="button" onclick="gsftSubmit(null, g_form.getFormElement(), 'sysverb_update_and_stay');" style="padding: 10px 20px; background-color: #5cb85c; color: white; border: none; border-radius: 5px; cursor: pointer;">
OK
</button>
</div>
</g:ui_form>
</j:jelly>
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2025 04:04 AM
use this
var dialog = new GlideModal('UI_PAGE', true);
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2025 04:04 AM
use this
var dialog = new GlideModal('UI_PAGE', true);
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2025 04:09 AM
if we use GlideDialogWindow then we can use this
dialog.removeCloseDecoration();
But since we are using GlideModal, we can send 2nd parameter as true and cross icon is gone.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2025 05:20 AM
Seriously! Simple as that! 🤣
Thanks again @Ankur Bawiskar!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2025 05:21 AM
Yes indeed !
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader