skyer2000 Posted October 1, 2008 Share Posted October 1, 2008 I'm having a problem with a script in IE6. Works fine in all other browsers, and even works in IE6 after pressing "Yes" to the error message that pops up. Here is the script, any ideas on how to make it not display the "Object Required" error at line 35? <script type="text/javascript"> /*********************************************** * Cross browser Marquee II- © Dynamic Drive (www.dynamicdrive.com) * This notice MUST stay intact for legal use * Visit http://www.dynamicdrive.com/ for this script and 100s more. ***********************************************/ var delayb4scroll=0 var marqueespeed=1 var pauseit=0 var copyspeed=marqueespeed var pausespeed=(pauseit==0)? copyspeed: 0 var actualheight='' function scrollmarquee(){ if (parseInt(cross_marquee.style.top)>(actualheight*(-1)+) cross_marquee.style.top=parseInt(cross_marquee.style.top)-copyspeed+"px" else cross_marquee.style.top=parseInt(marqueeheight)+8+"px" } function initializemarquee(){ cross_marquee=document.getElementById("vmarquee") cross_marquee.style.top=0 //LINE 35 marqueeheight=document.getElementById("marqueecontainer").offsetHeight actualheight=cross_marquee.offsetHeight if (window.opera || navigator.userAgent.indexOf("Netscape/7")!=-1){ cross_marquee.style.height=marqueeheight+"px" cross_marquee.style.overflow="scroll" return } setTimeout('lefttime=setInterval("scrollmarquee()",30)', delayb4scroll) } if (window.addEventListener) window.addEventListener("load", initializemarquee, false) else if (window.attachEvent) window.attachEvent("onload", initializemarquee) else if (document.getElementById) window.onload=initializemarquee </script> Quote Link to comment Share on other sites More sharing options...
xtopolis Posted October 1, 2008 Share Posted October 1, 2008 It works in IE 6. Just tested it, the same script: http://www.dynamicdrive.com/dynamicindex2/cmarquee2.htm Could it be you didn't copy their div containers... <div id="marqueecontainer" onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=marqueespeed"> <div id="vmarquee" style="position: absolute; width: 98%;"> <!--YOUR SCROLL CONTENT HERE--> <h4>Your scroller contents</h4> <!--YOUR SCROLL CONTENT HERE--> </div> </div> Marquee.. bad... Quote Link to comment Share on other sites More sharing options...
skyer2000 Posted October 2, 2008 Author Share Posted October 2, 2008 Nah marquees are not bad in all situations. With this script and transparent PNGs I was able to reproduce this flash-based scroller into a search-engine friendly javascript one, which is also much easier to update - http://www.millercoors.com/Home.aspx. The IE6 testing software I'm using must be causing the problem then, thanks for checking! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.