Ragazzi,
alla funzione che vedete in basso passo un URL del tipo assoluto su un altro dominio:
es: http://www.html.it
il link server per farmi tornare un valore da un altro server che devo controllare nella mia pagina web.
Ora, con IE 6.x e 7.x funziona tutto correttamente.
Firefox (e aggiungo anche netscape 7) non ne vuole sapere...non fornisce nessun alert, ne positivo ne negativo.
la cosa che ho notato è che se invece passo degli url che sono sullo stesso dominio allora funziona anche con firefox.... la domanda è: perchè ?
ps: ho
codice:
function doXMLHTTPGet(vurl) {
if (window.XMLHttpRequest) {
//We are in a non-IE browser
httpObj=new XMLHttpRequest()
} else if (window.ActiveXObject) {
//We are in IE
httpObj=new ActiveXObject("Microsoft.XMLHTTP")
}
document.getElementById("txtmsg").innerHTML = "Check Connection....";
//Return the XML document when it has finished loading
httpObj.onreadystatechange= function()
{
if (httpObj.readyState==4)
{
if (httpObj.status==200)
{
alert("Correct Access");
}
else
{
alert("Problem while accessing:" + httpObj.statusText)
}
}
}
//Request the XML document
httpObj.open("GET",vurl,true)
httpObj.send(null)
}