Jump to content

[SOLVED] IE6 Object required error


skyer2000

Recommended Posts

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>

Link to comment
https://forums.phpfreaks.com/topic/126675-solved-ie6-object-required-error/
Share on other sites

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...

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!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.