my javascript code is working in internet explorer but not working in mozilla

Posted by goutham on Stack Overflow See other posts from Stack Overflow or by goutham
Published on 2010-02-17T05:49:00Z Indexed on 2010/05/22 13:00 UTC
Read the original article Hit count: 217

Filed under:
function buildMenu() {
speed=35;
topdistance=100;
items=6;
y=-50;
ob=1;
if (navigator.appName == "Netscape") {
v=".top=",dS="document.",sD="";
}
else {
v=".pixelTop=",dS="",sD=".style";
   }
}
function scrollItems() {
if (ob<items+1) {
objectX="object"+ob; y+=10; eval(dS + objectX + sD + v + y);
if (y<topdistance) setTimeout("scrollItems()",speed);
else y=-50, topdistance+=40, ob+=1, setTimeout("scrollItems()",speed);
   }
}

© Stack Overflow or respective owner

Related posts about JavaScript