Ciao,
Sono nuovo del forum.
Ho un mega problemone...

Sto provando qualche chiamata Ajax...

Utilizzo la seguente funzione per recuperare il giusto oggetto in base al browser....



function assegnaXMLHttpRequest() {

// lista delle variabili locali
var
// variabile di ritorno, nulla di default
XHR = null,

// informazioni sul nome del browser
browserUtente = navigator.userAgent.toUpperCase();

// browser standard con supporto nativo
// non importa il tipo di browser
if(typeof(XMLHttpRequest) === "function" || typeof(XMLHttpRequest) === "object"){

XHR = new XMLHttpRequest();
}
// browser Internet Explorer
// è necessario filtrare la versione 4
else if(
window.ActiveXObject &&
browserUtente.indexOf("MSIE 4") < 0
) {

// la versione 6 di IE ha un nome differente
// per il tipo di oggetto ActiveX
if(browserUtente.indexOf("MSIE 5") < 0)
XHR = new ActiveXObject("Msxml2.XMLHTTP");

// le versioni 5 e 5.5 invece sfruttano lo stesso nome
else
XHR = new ActiveXObject("Microsoft.XMLHTTP");
}

return XHR;
}



Questa è la funzione che fa la chiamata AJAX

function testGetXXX(){
var url="http://xxx.xxx.xxx.xxx/chiama";
ajax.open("GET",url,false);
ajax.send();
}



e poi ho...

ajax.onreadystatechange=function state_Change(){
alert('READY STATE: '+ajax.readyState);
if (ajax.readyState==4){
alert('STATUS: '+ajax.status);
if (ajax.status==200){
alert(ajax.responseText);
prendiElementoDaId('risultati').innerHTML=ajax.res ponseText;
elaboraReccomandation(ajax.responseText);
}else{
alert("Problem retrieving XML data")
}
}
}


In Internet Explorer la chiamata funziona correttamente. Il READYSTATE diventa 4 e STATUS 200 e leggo tranquillamente ciò che mi restituisce il server (un oggetto JSON).
In FIREFOX la stessa pagina non funziona...
Il READYSTATE diventa 4 ma lo STATUS è 0 e il server non mi ritorna nessun oggetto JSON.

La pagina è sul mio disco locale la funzione testGetXXX esegue la chiamata AJAX verso un server della mia intranet.

Ho dato un'occhiata alla REQUEST e la RESPONSE che scambiano IE e FIREFOX con il server...
L'unica differenza fondamentale è che FIREFOX invia l'header ORIGIN mentre IE no.
Ho notato che cmq nonostante FIREFOX non mi fa vedere ciò che mi ritorna il server, cmq nella response del server il codice di riposta è 200 OK e Content-Type application/json.

Può essere un problema di chiamata INFRA-DOMAIN?
Come mai però in IE funziona?
Come posso risolvere?

HEEEEELP ME!!!!!