GlideDialogWindow showing as Page cannot be found

Mrman
Tera Guru

Hi All ,

Please help with this requirement . I have created catalog Onchange client script to verify the computer name entered by the user on the catalog form. I am making GlideAjax to a script include which inturn will be calling the Powershell script .I am making Synchronous Ajax call so user need to wait for result whether Computer name entered is Valid AD object or not.

The issue I am facing is Once change is made to the Computer name variable , the dialog window is showing as loading but Immediately it comes as "Page not found" shown below . Please help me what changes I need to make to the On Change Catalog client script.

find_real_file.png

Onchange Catalog Client script:

------------------------------------------

function onChange(control, oldValue, newValue, isLoading) {

if (newValue != '') {

var loadingDialog = new GlideDialogWindow("dialog_loading", true);

loadingDialog.setTitle('Please wait,your computer name is getting verified'); //Set the loading dialog title here...

loadingDialog.render();

var cuser = g_form.getValue('requestor');

//alert(cuser);

var userAjax   = new GlideAjax('GenericAJAXUtil');

userAjax.addParam('sysparm_name', 'getUSerDomain');

userAjax.addParam('sysparm_user',cuser);

userAjax.getXML(function(response){

var resp = response.responseXML.documentElement.getAttribute('answer');

//alert(resp);

var cAjax = new GlideAjax('ValidateComputerUtil');

cAjax.addParam('sysparm_name', 'checkcomputer');

cAjax.addParam('sysparm_value1', newValue );

cAjax.addParam('sysparm_value2', resp);

cAjax.getXMLWait();

alert(cAjax.getAnswer().output);

loadingDialog.destroy();

});

}

}

1 ACCEPTED SOLUTION

Gurpreet07
Mega Sage

There seems to be some issue with loading_dialog macro as well. Its mentioned that its no longer working after fuji release. Below thread seems to have a code from UI Macro which can be used ti create a new UI page and then it should work when you pass the ui page name in the GlideDialoWindow.


Re: Show/Hide Loading Dialog on shopping cart submit


Above should help you to fix the page not found error but further you need to work on your code to get it working properly.


View solution in original post

6 REPLIES 6

Gurpreet07
Mega Sage

There seems to be some issue with loading_dialog macro as well. Its mentioned that its no longer working after fuji release. Below thread seems to have a code from UI Macro which can be used ti create a new UI page and then it should work when you pass the ui page name in the GlideDialoWindow.


Re: Show/Hide Loading Dialog on shopping cart submit


Above should help you to fix the page not found error but further you need to work on your code to get it working properly.


Hi Gurpreet,



I tried with the below script as per the link you provided , it is still displaying the same error.



We are on Istanbul version . I do not find this UI macro in our system. Please suggest.



function onChange(control, oldValue, newValue, isLoading) {


if (newValue != '') {


var loadingDialog = new GlideDialogWindow('form_loading_dialog');


loadingDialog.setTitle('Please wait,your computer name is getting verified');


loadingDialog.render();


var cuser = g_form.getValue('requestor');


var userAjax   = new GlideAjax('GenericAJAXUtil');


userAjax.addParam('sysparm_name', 'getUSerDomain');


userAjax.addParam('sysparm_user',cuser);


userAjax.getXML(function(response){


var resp = response.responseXML.documentElement.getAttribute('answer');


//alert(resp);



var cAjax = new GlideAjax('ValidateComputerUtil');


cAjax.addParam('sysparm_name', 'checkcomputer');


cAjax.addParam('sysparm_value1', newValue );


cAjax.addParam('sysparm_value2', resp);


cAjax.getXMLWait();


alert(cAjax.getAnswer().output);


loadingDialog.destroy();



});


}




}