awesomebeats
Technical User
i'm using dreamweaver and i have a extension that makes the following code for a dhtml layer scroll thing, however, i get an error with line 26, a runtime error. it asks if i want to debug, if i hit refesh everything works. here's the code. the code in red it line 26 that's causing the error.
if (m){if((parseInt(navigator.appVersion)>4 || navigator.userAgent.indexOf("MSIE"
>-1)&&
any idea why this is happening and what it means
Code:
<script language="JavaScript">
<!--
function P7AniMagic(el, x, y, a, b, c, s) { //v2.8 PVII
var g,elo=el,f="",m=false,d="";x=parseInt(x);y=parseInt(y);
var t = 'g.p7Magic = setTimeout("P7AniMagic(\''+elo+'\',';
if ((g=MM_findObj(el))!=null) {d=(document.layers)?g:g.style;}else{return;}
if (parseInt(s)>0) {eval(t+x+','+y+','+a+','+b+','+c+',0)",' + s+')');return;}
var xx=(parseInt(d.left))?parseInt(d.left):0;
var yy=(parseInt(d.top))?parseInt(d.top):0;
if(parseInt(c)==1) {x+=xx;y+=yy;m=true;c=0;}
else if (c==2) {m=false;clearTimeout(g.p7Magic);}
else {var i=parseInt(a);
if (eval(g.moved)){clearTimeout(g.p7Magic);}
if (xx<x){xx+=i;m=true;if(xx>x){xx=x;}}
if (xx>x){xx-=i;m=true;if(xx<x){xx=x;}}
if (yy<y){yy+=i;m=true;if(yy>y){yy=y;}}
if (yy>y){yy-=i;m=true;if(yy<y){yy=y;}}}
Code:
<navigator.userAgent.indexOf("Opera")==-1){
xx+="px";yy+="px";}
d.left=xx;d.top=yy;g.moved=true;eval(t+x+','+y+','+a+','+b+','+c+',0)",'+b+')');
}else {g.moved=false;}
}
//-->
</script>
any idea why this is happening and what it means