I have an onChange client script and the GlideDialogWindow is not working in the Portal

phoang
Kilo Expert

I have an onChange client script that is using the GlideDialogWindow to show a loading window, it works fine from the catalog but when I try it in the Portal I am receiving a Javascript browser error saying that GlideDialogWindow is not defined.  I found a couple articles that said GlideModal is replacing GlideDialog, but I tried that also and it didn't work.

How can I display a page loading window in the onChange client script that will work in the Portal?  Or is my glidemodal script wrong?  I've never used glidemodal.  I've tried the following:

var loadingDialog = new GlideDialogWindow("dialog_loading", true);
loadingDialog.setPreference('table', 'loading');
loadingDialog.setTitle('Validating ');
loadingDialog.render();

 


var dialogClass = window.GlideModal ? GlideModal : GlideDialogWindow;
var dd = new dialogClass("dialog_loading", true);
dd.setPreference('table', 'loading');
dd.setTitle("Validating");
dd.render();

 

1 ACCEPTED SOLUTION

bishopx
Giga Guru

In service portal there is spModal class for you.

Read more here spModal

View solution in original post

2 REPLIES 2

bishopx
Giga Guru

In service portal there is spModal class for you.

Read more here spModal

jxsaxton421
Tera Guru

var loadingDialog = new GlideDialogWindow("dialog_loading", true);
loadingDialog.setPreference('table', 'loading');
loadingDialog.setTitle('Validating ');
loadingDialog.render();

 

This code seems to be loading some internal Servicenow UI page "dialog_loading" which is actually getting rendered on top of your other dialog window.