New client-scripts are run in strict mode, with direct DOM access disabled. Access to jQuery, prototype and the window object are likewise disabled. To disable this on a per-script basis, configure this form and add the "Isolate script" field. To dis

John Vo1
Tera Guru

I'm getting this error in my Dev instance and it's on London.  I've set the glide.script.block.client.globals to false and it's still not working.  My Prod instance is on Kingston and it works correctly.  We have to upgrade Prod soon and would like someone to take a look at my code and see if they can help me update it.

 

Here is my code.

function onChange(control, oldValue, newValue, isLoading) {
if (isLoading)
return;

 

var ga = new GlideAjax('pattCiCheck');

 

ga.addParam('sysparm_name', 'getCiSupportGroup');
ga.addParam('sysparm_ci', newValue);
//alert(g_form.getValue('cmdb_ci'));
//ga.addParam('sysparm_ag', g_form.getValue('assignment_group'));
//alert(g_form.getValue('assignment_group'));
ga.getXML(doAlert); // Always try to use asynchronous (getXML) calls rather than synchronous (getXMLWait)
}

 

// Callback function to process the response returned from the server
function doAlert(response) {

 

var answer = response.responseXML.documentElement.getAttribute("answer");

 

var answers = answer.split(',');

 

if (answer != '')
g_form.setValue("variables.software_owner", answers[0]);
g_form.setValue("license_type", answers[1]); // Change accordingly
g_form.setValue("ad_group_name", answers[2]);
}

6 REPLIES 6

macaspacp
Mega Contributor

Hi,

 

I am getting the same error as well. I am using Washington DC Patch 1 (latest release). I unchecked the 'Isolate script' but getting this error "

New client-scripts are run in strict mode, with direct DOM access disabled. Access to jQuery, prototype and the window object are likewise disabled. To disable this on a per-script basis, configure this form and add the "Isolate script" field. To disable this feature for all new globally-scoped client-side scripts set the system property "glide.script.block.client.globals" to false.

"

sagarkadam1
Tera Contributor

Hi,

I am also getting same error  I am using  Washington DC Release Error - New client-scripts are run in strict mode, with direct DOM access disabled. Access to jQuery, prototype and the window object are likewise disabled. To disable this on a per-script basis, configure this form and add the "Isolate script" field. To disable this feature for all new globally-scoped client-side scripts set the system property "glide.script.block.client.globals" to false. In Form It is already added Isolate script checkbox , i unchecked and checked still same issue is showing while running a client script please suggest me solution

Screenshot_3.png

 

Here is my code 

function onChange(control, oldValue, newValue, isLoading, isTemplate) {
   if (isLoading || newValue === '') {
      return;
   }

   var ga=new GlideRecord('getEmailWithGlideAJax');
   ga.addParam('sysparm_name','getEmailID');
   ga.addParam('sysparm_user_details',g_form.getValue('caller_id'));
   ga.getXML(emailDetails);

   function emailDetails(responce){
    var emailID=responce.responceXML.documentElement.getAttribute('answer');
    g_form.setValue('u_email',emailID);
   }



   
}