1

I am using pure JavaScript to make cross domain post request. Its working for all the desktop browser including Chrome. However request is getting failed with statusCode: 0 in the chrome mobile browser.

function MakeAJAXRequest(jsonData){
   var ajaxRequest = new window.XMLHttpRequest();
   ajaxRequest.onload = function () { . . . };
   ajaxRequest.onreadystatechange = function () { . . . };
   ajaxRequest.onerror = function () {. . . };
   ajaxRequest.ontimeout = function () { . . .};
   ajaxRequest.open("POST", 'https://someotherdomain.com/myservice/postSomeData', true);
   ajaxRequest.send(jsonData);      
}

Any help would be much appreciated.

PS: I am getting the correct response in default android browser.

Thanks.

Niraj Patel
  • 111
  • 1
  • 6

0 Answers0