How close UI Page Dailogue window?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-24-2020 02:48 AM
Hi,
UI Page not working in Agent Workspace. how to close dialogue window in Agent workspace
UI Page 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">
<table width="100%" height="100%">
<tr>
<td>
<g:ui_multiline_input_field name="dial_comments" label="Additional comments" value="${jvar_comments_text}" mandatory="true" />
<label style="display: block;">Contact Type</label>
<g:ui_choicelist name='HoldReason' label="Contact Type" table='incident' field='contact_type'/>
<label style="display: block;">Business Service</label>
<g:ui_reference name="input_business_service" table="cmdb_ci_service" query="nameNOT LIKEBlackberry" label="Business service"/>
</td>
</tr>
<tr>
<td colspan="2">
</td>
</tr>
<tr id="dialog_buttons">
<td colspan="5" align="right">
<g:dialog_buttons_ok_cancel ok="return validateComments()" ok_type="button" cancel_type="button" />
</td>
</tr>
</table>
</j:jelly>
client script:
function validateComments() {
var businessservice=gel("input_business_service").value;
var comments = gel("dial_comments").value;
var contacttype=gel("HoldReason").value;
comments = trim(comments);
if ((comments == "" )||(businessservice=="")||(contacttype==""))
{
alert("Please Fill fields to submit the dialog.");
return false;
}
GlideDialogWindow.get().destroy();
g_form.setValue("comments", comments);
g_form.setValue('business_service',businessservice);
g_form.setValue('contact_type',contacttype);
}
how to fix OK, Cancel buttons issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2020 10:40 AM
i think if you see my above script i already used "GlideDialogWindow.get().destroy(); ", any alternative choice? i not pretty sure why UI Page not working at Agent workspace side.
if you wanna check in my instance i can share my PDI credential
i am pasting my script again here,
Client :
function validateComments() {
var businessservice=gel("input_business_service").value;
var comments = gel("dial_comments").value;
var contacttype=gel("HoldReason").value;
comments = trim(comments);
if ((comments == "" )||(businessservice=="")||(contacttype=="")){
alert('test');
return false;
}
GlideDialogWindow.get().destroy();
g_form.setValue("comments", comments);
g_form.setValue('business_service',businessservice);
g_form.setValue('contact_type',contacttype);
return true;
}
function cancel()
{
g_modal.showFrame(false);
return false;
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2020 11:28 AM
Hi,
Try this-
Please mark correct or helpful.
Thanks
Swapnil Soni
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2020 07:21 AM
Thanks for reply
HTML:
<g:dialog_buttons_ok_cancel ok="return validateComments()" cancel="return cancel()" ok_type="button" cancel_type="button" />
client script:
function validateComments() {
var businessservice=gel("input_business_service").value;
var comments = gel("dial_comments").value;
var contacttype=gel("HoldReason").value;
comments = trim(comments);
if ((comments == "" )||(businessservice=="")||(contacttype=="")){
alert('test');
return false;
}
GlideDialogWindow.get().destroy();
g_form.setValue("comments", comments);
g_form.setValue('business_service',businessservice);
g_form.setValue('contact_type',contacttype);
return true;
}
var huell;
function shippingOptions() {
huell = new GlideOverlay({
title: 'Shipping Options',
form: 'shipping_options',
height: 370,
width: 340
});
huell.render();
return false;
}
function cancel(){
huell.close();
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2020 10:41 PM
So is it working or not?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2020 05:38 AM
sorry to say this, it is not working. i request you to take a look please
you can dev60602 test123 /123456
UI page: comments
ui action : comments dailogue
var huell;
function shippingOptions() {
huell = new GlideOverlay({
title: 'Shipping Options',
form: 'shipping_options',
height: 370,
width: 340
});
huell.render();
return false;
}
function felina(){
huell.close();
}
GlideOverlay has a close method on it that is separate from GlideWindow, meaning GlideDialogWindow.getWindow.destroy won't work. This should close your overlay.