ho trovato questo script che fa giusto al caso mio e le legge dall'esterno in un file .xml:
codice:
<HTML>
<HEAD>
<TITLE>HTML.it - il sito italiano sul Web publishing</TITLE>
<style>
A:link, A:visited { text-decoration: none }
A:hover { text-decoration: underline }
</style>
</HEAD>
<BODY BGCOLOR="white" vlink="blue" link="blue">
<table align="center" cellpadding="0" cellspacing="0">
<tr>
<td>
<script language="JavaScript1.2">
var tickercontainer='<div align="center" id="container" style="background-color:#f0f0f0;border-width:1;border-style:solid;border-color:black;width:300;height:300;font:normal 13.75px Verdana;"></div>'
var xmlsource="messaggi.xml"
if (window.ActiveXObject)
var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
else if (document.implementation && document.implementation.createDocument)
var xmlDoc= document.implementation.createDocument("","doc",null);
if (typeof xmlDoc!="undefined"){
document.write(tickercontainer)
xmlDoc.load(xmlsource)
}
var notWhitespace = /\S/
function init_ticker(){
tickerobj=xmlDoc.getElementsByTagName("xmlticker")[0]
for (i=0;i<tickerobj.childNodes.length;i++){
if ((tickerobj.childNodes[i].nodeType == 3)&&(!notWhitespace.test(tickerobj.childNodes[i].nodeValue))) {
tickerobj.removeChild(tickerobj.childNodes[i])
i--
}
}
document.getElementById("container").innerHTML=tickerobj.childNodes[1].firstChild.nodeValue
msglength=tickerobj.childNodes.length
currentmsg=2
themessage=''
setInterval("rotatemsg()",tickerobj.childNodes[0].firstChild.nodeValue)
}
function rotatemsg(){
var msgsobj=tickerobj.childNodes[currentmsg]
if (msgsobj.getAttribute("url")!=null){
themessage='<a href="'+msgsobj.getAttribute("url")+'"'
if (msgsobj.getAttribute("target")!=null)
themessage+=' target="'+msgsobj.getAttribute("target")+'"'
themessage+='>'
}
themessage+=msgsobj.firstChild.nodeValue
if (msgsobj.getAttribute("url")!=null)
themessage+='</a>'
document.getElementById("container").innerHTML=themessage
currentmsg=(currentmsg<msglength-1)? currentmsg+1 : 1
themessage=''
}
function fetchxml(){
if (xmlDoc.readyState==4)
init_ticker()
else
setTimeout("fetchxml()",10)
}
if (window.ActiveXObject)
fetchxml()
else if (typeof xmlDoc!="undefined")
xmlDoc.onload=init_ticker
</script>
</td>
</tr>
</table>
<font size=1 face="arial">
<div align="center"> </div>
</font></BODY>
</HTML>
solo che queste si muovono e ne visualizza solo una alla volta come faccio a fare questa modifica??