Ciao a tutti, sono nuovo del forum.![]()
Ho prelevato da questo sito, una scroll news in asp.
Il Javascript che effettua lo scroll delle notizie presenta delle incompatibilita' tra browser.
In IE tutto ok;
In Opera, funziona ma non si ferma quando si passa sopra con il mouse;
In Netscape invece lo script non funziona piu'.
Sapete aiutarmi a trovare una soluzione che dia lo stesso risultato e che sia compatibile con tutti i browser?
Grazie in anticipo per l'aiuto.
![]()
Ps- lo script usato e' questo:
<SCRIPT language="JavaScript1.2">
var marqueewidth=150
var marqueeheight=250
var marqueecontents='<div class=testoscroll><%= Replace(strtesto, "'", "\'") %></div>'
if (document.all)
document.write('<marquee direction="up" scrollAmount="3" onMouseover="this.scrollAmount=1" onMouseout="this.scrollAmount=3" style="width:'+marqueewidth +';height:'+marqueeheight+'">' +marqueecontents+'</marquee>')
function regenerate(){
window.location.reload()
}
function regenerate2(){
if (document.layers){
setTimeout("window.onresize=regenerate",450)
intializemarquee()
}
}
function intializemarquee(){
document.cmarquee01.document.cmarquee02.document.w rite( marqueecontents)
document.cmarquee01.document.cmarquee02.document.c lose()
thelength=document.cmarquee01.document.cmarquee02. document.height
scrollit()
}
function scrollit(){
if (document.cmarquee01.document.cmarquee02.top>=thel ength*(-1)){
document.cmarquee01.document.cmarquee02.top-=speed
setTimeout("scrollit()",100)
}else{
document.cmarquee01.document.cmarquee02.top = marqueeheight
scrollit()
}
}
window.onload=regenerate2
</SCRIPT>