Allora la soluzione è questa
<script LANGUAGE="JavaScript">
msg = "<%
While ((Repeat1__numRows <> 0) AND (NOT oly_anni.EOF))
%><%=(oly_anni.Fields.Item("ANNO_OLY").Value)%> |<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
oly_anni.MoveNext()
Wend
%>";
pos = 0;
function ScrollMessage() {
var newtext = msg.substring(pos, msg.length) + msg.substring(0, pos);
var div = document.getElementById("scroll");
div.firstChild.nodeValue = newtext;
pos++;
if (pos > msg.length) pos = 0;
window.setTimeout("ScrollMessage()",120);
}
</script>
Implementata anche con ASP
Il problema è che non riesco convertire il campo msg in un campo che accetti le stringhe:
mi spiego meglio
Se provassi a mettere un tag anche semplicemente <span></span>
lo script mi tirerebbe fuori a ripetizione <span>ciao</span><span>ciao</span><span>ciao</span> ecc...
Voi avete qualche suggerimento?