Forum Moderators: open

Message Too Old, No Replies

ie is undefined

in a scroller script

         

stef25

3:01 pm on May 31, 2004 (gmt 0)

10+ Year Member



according to IE, on the second line here. this is only part of a script from dynamic drive:

what does "ie is undefined" mean, i get this error quite alot and hope to be able to fix it myself soon

<script language="JavaScript1.2">
if (ie¦¦dom){
document.writeln('<div id="main2" style="position:relative;width:'+scrollerwidth+';height:'+scrollerheight+';overflow:hidden;background-color:'+scrollerbgcolor+' ;background-image:url('+scrollerbackground+')">')
document.writeln('<div style="position:absolute;width:'+scrollerwidth+';height:'+scrollerheight+';clip:rect(0 '+scrollerwidth+' '+scrollerheight+' 0);left:0px;top:0px">')
document.writeln('<div id="first2" style="position:absolute;width:'+scrollerwidth+';left:0px;top:1px;">')
document.write(messages[0])
document.writeln('</div>')
document.writeln('<div id="second2" style="position:absolute;width:'+scrollerwidth+';left:0px;top:0px;visibility:hidden">')
document.write(messages[dyndetermine=(messages.length==1)? 0 : 1])
document.writeln('</div>')
document.writeln('</div>')
document.writeln('</div>')
}
</script>

Jaec

3:08 pm on May 31, 2004 (gmt 0)

10+ Year Member



it means token (variable in this case) "ie" is not defined before using in the condition "if", usually this variable is asigned a boolean flag indicating if the user (client-side) are using Internet Explorer or not.

Joel

stef25

3:25 pm on May 31, 2004 (gmt 0)

10+ Year Member



the problem is that the scroller doesnt appear. any idea how i can fix this?