Can't close a GlideModal window
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā07-13-2018 07:43 AM
Hello Community,
I've been checking every article I can find about this issue on the community but I've had no success. My goal is simple...CLOSE THE GLIDEMODAL! That's all I really want to do. To be clear, I have the X in the upper right corner of the modal dialog. That successfully closes the popup. That's not a problem. I have a button in the dialog that I want to close the dialog when it's clicked. Nothing I do from within the dialog is closing it.
I'm getting the error that GlideDialogWindow is not defined or GlideModal is not defined or cannot read property destroy of undefined or cannot read property get of undefined. I don't know what else to try here. Suggestions? Here is my code in its current state.
- Labels:
-
User Interface (UI)
- 7,444 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā08-05-2020 12:11 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā12-23-2020 01:22 PM
Hmm..not working for me , I'm able to get modal it looks like:
Can it be because I'm rendering my UI Page in GlideModal (through gm.renderIframe)
How can I close it?
$scope.close = function(){
var queryString = window.location.search;
var urlParams = new URLSearchParams(queryString);
var table = urlParams.get('table')
var sys_id = urlParams.get('sys_id')
console.log(table);
console.log(sys_id);
var a = new GlideModal().get('mymodal')
console.log(a);
a.destroy();
};
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā06-06-2024 07:48 AM
did you figure out how to close the iframe?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā11-23-2021 09:25 AM
I've had this problem on and off for a few years now!!! Code that was working on a GlideModal has stopped working again.
I've just found this ServiceNow example that works fine, as long as you call the function using "g:dialog_button", also in the example.
Thanks,
Jason