Allora ho un file html:
-----------------------------------------------------------
<html>
<head>
<title></title>
<script language="javascript" for="window" event="onload" src="script/news.js"></script>
</head>
<body>
<xml id="DSO_News" src="dati/news_2005.xml"></xml>
<div id="Stampa"></div>
</body>
</html>
-----------------------------------------------------------
Un file xml:
-----------------------------------------------------------
<?xml version="1.0" encoding="iso-8859-1"?>
<news>
<id>
<data></data>
<titolo></titolo>
<descrizione></descrizione>
</id>
</news>
-----------------------------------------------------------
e un file javascript:
-----------------------------------------------------------
var Mostra = "";
var StringaXml = DSO_News.XMLDocument;
var i;
for (i=0; i<StringaXml.documentElement.childNodes.length; i++)
{
Mostra += "<table width='100%'>"
Mostra += "<tr class='news_titolo'>"
Mostra += "<td width='20%' align='center'>" + StringaXml.documentElement.childNodes(i).childNode s(0).text + "</td>"
Mostra += "<td>" + StringaXml.documentElement.childNodes(i).childNode s(1).text + "</td>"
Mostra += "</tr>"
Mostra += "<tr class='news_descrizione'>"
Mostra += "<td></td>"
Mostra += "<td>" + StringaXml.documentElement.childNodes(i).childNode s(2).text + "</td>"
Mostra += "</tr>"
Mostra += "</table>"
Mostra += "
";
}
Stampa.innerHTML = Mostra;
-----------------------------------------------------------
Per tutto questo ho preso esempio da una guida di PRO.html
Il problema è che con Internet Explorer funziona bene, mentre con Firefox non vedo niente ? Perchè?
Qualcuno sa aiutarmi ?
Grazie

Rispondi quotando