Hello everyone,
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?