GlideDialogWindow.get().destroy(); not working in Agent Workspace
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-24-2020 06:51 AM
Hi ,
i used this function in UI Page, but GlideDialogWindow.get().destroy(); function not working in Agent Workspace.
how to kill dialogue box when we click on Cancel button
UI PAge:
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 == "" ){
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()
{
GlideDialogWindow.get().destroy();
return false;
}
UI Action:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2020 06:23 PM
In the client script of ui page add the following function:
function cancel() {
GlideDialogWindow.get().destroy();
}
Thanks
Harsha
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2020 04:55 AM
i think , i already added that right?
function cancel()
{
GlideDialogWindow.get().destroy();
return false;
}
shall i remove return false? i tried that way too. but still window not destroyed
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2020 06:57 AM
@chanikya
I have the same issue for both Ok and Cancel buttons in AWS.
Browser console shows: Uncaught TypeError: GlideDialogWindow.get is not a function
Is it working for you with"Ok" button?
Thanks,
-Binu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2020 07:00 AM
Browser Console says: Uncaught TypeError: GlideDialogWindow.get is not a function
Is it working for you with Ok button?
Thanks,
-Binu