Viva O código em baixo funciona no Firefox, mas no internet explorer 8 não funciona. Porque? Qual a solução? Obrigado //Legendas
var txt=new Array(3);
if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}
else
{// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.open("GET","Legendas.xml",false);
xmlhttp.send("");
xmlDoc=xmlhttp.responseXML;
txt[0]=xmlDoc.getElementsByTagName("Texto")[0].childNodes[0].nodeValue;
txt[1]=xmlDoc.getElementsByTagName("Texto")[1].childNodes[0].nodeValue;
txt[2]=xmlDoc.getElementsByTagName("Texto")[2].childNodes[0].nodeValue;
function t(i){
document.getElementById("LEGENDA").innerHTML="<p>"+txt[i]+"</p>";
}