Ajax

  
Hi,
The below code is running ok in my two different environments(java+tomcat+ie9,php+apach+ie9), but when I paste it to Outsystem`s javascript, it`s not working.
I have use the same inputs and the same condition.
Please have a look on it, thank you.
function isChild(arnum) {
    var flag = 0;
    var xmlhttp = new XMLHttpRequest();
    var url     = 'http://cit-reports.usd.lab.emc.com/CIT_Common_AR.php?';
    var data    = "service=isChild&parent="+arnum;
    
    xmlhttp.open("GET", url+data, false);
    xmlhttp.setRequestHeader('Content-type','application/x-www-form-urlencoded; charset=UTF-8');
    xmlhttp.send();
    
    var reg  = new RegExp(/\d{3}/);
    var code = xmlhttp.responseText.match(reg);
    
    return code;
}
Greetings,

The platform doesn't interfere with the execution of custom JavaScript (pasting that code into a screen/webblock/eSpace's javascript will just generate a <script> tag in the page's head, importing that code), so the issue is probably related to how you are invoking that function.

If you could provide a public link to your application, or attach your eSpace to a forum post, someone here could probably help you with that.
João Pedro Abreu wrote:
Greetings,

The platform doesn't interfere with the execution of custom JavaScript (pasting that code into a screen/webblock/eSpace's javascript will just generate a <script> tag in the page's head, importing that code), so the issue is probably related to how you are invoking that function.

If you could provide a public link to your application, or attach your eSpace to a forum post, someone here could probably help you with that.
 Thanks a lot for the reply.