Close GlideDialogWindow Popup

bradd_
Mega Contributor

Hello,

I'm working on a form, and I have a onChange script that opens a GlideDialogWindow which has two buttons, Cancel and Print. The Cancel button executes GlideDialogWindow.get.destroy() and the Print button runs a javascript function to print the form. The form prints correctly and everything, but once the print dialog window closes, the GlideDialogWindow is still there and it won't return to the form.

Here's a screenshot of the UI Page that gets called via GlideDialogWindow function from the onChange script. The print_form is the id of the div containing the verbiage that is to be printed.

find_real_file.png

In the Javascript console, I get the following

find_real_file.png

6 REPLIES 6

abhishekdash
ServiceNow Employee
ServiceNow Employee

Hey Brad,



Can you try calling 'GlideDialogWindow.get().destroy();' inside okayClicked(divName) instead of calling it from closeWindow().



Let me know if that works.



Thanks,


Abhishek


Thanks for the reply Abishek. I tried this and the error persisted.