I keep getting the following error's:
uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIXMLHttpRequest.send]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: http://site/cms/js/interface.js :: doAjaxCall :: line 300" data: no]
uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIXMLHttpRequest.send]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: http://site/cms/js/interface.js :: doAjaxCall :: line 300" data: no]
Line 0
This is the function with the doAjaxCall
function doAjaxCall(cmd,params) {
var postdata='cmd='+cmd+'¶ms='+params;
var a=sajax_init_object();
if (a) {
a.open("POST","ajax_handler.php", false);
a.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
a.send(postdata); <====Line 300
document.body.style.cursor="default";
if(a.readyState == 4) {
return a.responseText;
} else {
alert("We where unable to execute the ajax call.");
}
}
function sajax_init_object() {
var A;
try {
A=new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
A=new ActiveXObject("Microsoft.XMLHTTP");
} catch (oc) {
A=null;
}
}
if(!A && typeof XMLHttpRequest != "undefined")
A=new XMLHttpRequest();
if (!A)
alert("Could not create connection object.");
return A;
}
Any idea's?
Due to security restrictions in Javascript, it is not possible to retrieve information from remote domains via an XMLHttpRequest. I think you need a proxy!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With