continuo a ricevere del seguente errore:problemi di ajax? con activexobjects
eccezione non rilevata: [Exception ... "ha prodotto Componente codice di errore: 0x80004005 (NS_ERROR_FAILURE) [nsIXMLHttpRequest.send]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" posizione : "JS telaio :: http://site/cms/js/interface.js :: :: doAjaxCall linea 300" dati: no]
eccezione non rilevata: [Exception ... "Componente ha restituito un errore Codice: 0x80004005 (NS_ERROR_FAILURE) [nsIXMLHttpRequest.send]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" Posizione: "frame JS :: http://site/cms/js/interface.js :: :: doAjaxCall linea 300" Dati: no]
Linea 0
Questa è la funzione con il 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;
}
Qualsiasi idea di?
è questo andare al di fuori del tuo dominio? Stai usando un url relativo o assoluto? –