Discussion:
[chromium-discuss] xmlhttp.status=0 in chrome. why ? how to fix that ???
Liron Ladelsky
2018-07-08 16:01:47 UTC
Permalink
function call_service(address_recordid) {

var parameters = { 'address_recordid': address_recordid };

var xmlhttp = new XMLHttpRequest();
xmlhttp.open("POST",
"http://crm_dev:82/ConnectedToAddress.asmx/IsOrderConnectOn", true);
xmlhttp.setRequestHeader("Content-Type", "application/json;
charset=utf-8");
xmlhttp.setRequestHeader("Accept", "application/json");

xmlhttp.onreadystatechange = function () {
if (xmlhttp.readyState == 4 /* complete */) {
alert(xmlhttp.status);
alert(address_recordid);
xmlhttp.onreadystatechange = null; //avoids memory leaks
if (xmlhttp.status == 201 || xmlhttp.status == 200) {
var newAccount = JSON.parse(xmlhttp.responseText);

Xrm.Page.getAttribute("el_order_connect").setValue(newAccount.d);
}
else {
//Failure
alert("aaa");
}
}
}
xmlhttp.send(JSON.stringify(parameters));
}
--
--
Chromium Discussion mailing list: chromium-***@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-discuss

---
You received this message because you are subscribed to the Google Groups "Chromium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-discuss+***@chromium.org.
PhistucK
2018-07-09 06:40:35 UTC
Permalink
Do you see any error in the console?
My guess is that you do not have CORS enabled in your other server.
Try stackoverflow.com instead.

☆*PhistucK*
Post by Liron Ladelsky
function call_service(address_recordid) {
var parameters = { 'address_recordid': address_recordid };
var xmlhttp = new XMLHttpRequest();
xmlhttp.open("POST", "
http://crm_dev:82/ConnectedToAddress.asmx/IsOrderConnectOn", true);
xmlhttp.setRequestHeader("Content-Type", "application/json;
charset=utf-8");
xmlhttp.setRequestHeader("Accept", "application/json");
xmlhttp.onreadystatechange = function () {
if (xmlhttp.readyState == 4 /* complete */) {
alert(xmlhttp.status);
alert(address_recordid);
xmlhttp.onreadystatechange = null; //avoids memory leaks
if (xmlhttp.status == 201 || xmlhttp.status == 200) {
var newAccount = JSON.parse(xmlhttp.responseText);
Xrm.Page.getAttribute("el_order_connect").setValue(newAccount.d);
}
else {
//Failure
alert("aaa");
}
}
}
xmlhttp.send(JSON.stringify(parameters));
}
--
--
http://groups.google.com/a/chromium.org/group/chromium-discuss
---
You received this message because you are subscribed to the Google Groups
"Chromium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an
--
--
Chromium Discussion mailing list: chromium-***@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-discuss

---
You received this message because you are subscribed to the Google Groups "Chromium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-discuss+***@chromium.org.
Continue reading on narkive:
Search results for '[chromium-discuss] xmlhttp.status=0 in chrome. why ? how to fix that ???' (Questions and Answers)
5
replies
Problem with PHP an Ajax. How can I fix this problem?
started 2010-11-03 21:32:51 UTC
programming & design
Loading...