Hi buddys,
I'm trying to create a rolling area on my webpage, which will rolling forever on the top corner of my webpage to show the up coming event, the following is my code, however it works in IE7 or lower, in IE 8, it only rolling one turn, in firefox, it's not moving at all!!! Can anyone help and see what shall I do with it??
Many thanks,
Cat
<DIV id=rolllink011
style="OVERFLOW: hidden; WIDTH: 189px; HEIGHT: 100px">
<CENTER>
<DIV id=rolllink1011 style="WIDTH: 189px; HEIGHT: 120px">
<table width="100%" border="0" id="table011">
<tr>
<td height ="100px" width="98%" id="TdBox011">
<p><strong>Events</strong></p>
<p align="left">First Event ............Date</p>
<p align="left">Second Event ........Date</p>
<p align="left">Third Event ...........Date</p></td>
</tr>
</table>
</DIV>
</CENTER>
<CENTER>
<DIV id=rolllink2011></DIV></CENTER></DIV>
<script language="Javascript">
function Marquee011(){
if(rolllink2011.offsetTop-rolllink011.scrollTop<=0)
rolllink011.scrollTop-=rolllink1011.offsetHeight;
else{
rolllink011.scrollTop++;
}
}
function Start011(){
var rollspeed011=40;
var rolllink1=TdBox011.offsetHeight;
var temp=rolllink1;
while(temp<rolllink011.offsetHeight)
{
document.getElementById("table011").insertRow(1);
document.getElementById("table011").rows[1].insertCell(0).innerHTML=TdBox011.innerHTML;
temp+=rolllink1;
}
rolllink2011.innerHTML=rolllink1011.innerHTML;
var MyMar011=setInterval(Marquee011,rollspeed011);
rolllink011.onmouseover=function() {clearInterval(MyMar011);}
rolllink011.onmouseout=function() {MyMar011=setInterval(Marquee011,rollspeed011);}
}
setTimeout("Start011();",1000);
</script>