Issue with popup glideDialog window
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Monday
Hi Team,
I am getting below error and please find the UI page HTML snippet please guide if there is anything i am missing.
SCRIPT: UI PAGE(HTML)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Monday
check below links for help
Demonstration Of UI Pages | Making Incident Form in UI Page
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Monday
Hi Deepthi,
I think you are missing
<script> tag
<![CDATA[ ... ]]> wrapper
as
Any JavaScript must be wrapped inside <script> tags
And because Jelly is XML-based, it must be enclosed in CDATA
Kindly check that
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Monday
Hi @Deepthi13 ,
Try the below Process once :
HTML :
<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<g:evaluate var="jvar_sys_id" expression="RP.getParameterValue('sysparam_sys_id')" />
<div style="padding:20px">
<input type="hidden" id="sysparam_sys_id" value="${jvar_sys_id}""")/>>
<h2>Conflict of Interest</h2>
<p>Do you have a conflict of Interest?</p>
<div style="margin-top:20px">
<button class="btn btn-primary" onclick="submitCOI('YES')">Yes</button>
<button class="btn btn-default" onclick="submitCOI('NO')">No</button>
</div>
</div>
</j:jelly>
Client Controller :
function submitCOI(answer) {
var sysIdEl = document.getElementById('sysparam_sys_id');
var sysId = sysIdEl ? sysIdEl.value : '';
var dlg = GlideModal.get() || GlideDialogWindow.get();
if (dlg) {
dlg.destroy();
}
if (answer === 'YES') {
var dlg2 = new GlideModal('review_coi_yes_details');
dlg2.setTitle('COI Declaration');
dlg2.setWidth(600);
dlg2.setPreference('sysparam_sys_id', sysId);
dlg2.render();
return;
}
// NO -> navigate back to record
var url = 'sn_bom_internal_investigation.do?sys_id=' + sysId;
if (window.top.g_navigation) {
window.top.g_navigation.open(url);
} else {
window.location.href = url;
}
}
Try the code mentioned above...
If the code is helpful for you please put a like on it...
