View Full Version : Resolved web page error
mlegg
11-29-2011, 04:36 PM
I've searched Google but can't seem to find a solution to this error from Internet Explorer.
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
Timestamp: Tue, 29 Nov 2011 05:27:27 UTC
Message: Object required
Line: 93
Char: 1
Code: 0
URI: http://www.pscompetitiveedge.com/leadership.html
jscheuer1
11-29-2011, 06:21 PM
You're not using this script:
<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=2000 //Specify initial delay before marquee starts to scroll on page (2000=2 seconds)
var marqueespeed=1.5 //Specify marquee scroll speed (larger is faster 1-10)
var pauseit=1 //Pause marquee onMousever (0=no. 1=yes)?
////NO NEED TO EDIT BELOW THIS LINE////////////
var copyspeed=marqueespeed
var pausespeed=(pauseit==0)? copyspeed: 0
var actualheight=''
function scrollmarquee(){
if (parseInt(cross_marquee.style.top)>(actualheight*(-1)+8))
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
marqueeheight=document.getElementById("marqueecontainer").offsetHeight
actualheight=cross_marquee.offsetHeight
if (window.opera || navigator.userAgent.indexOf("Netscape/7")!=-1){ //if Opera or Netscape 7x, add scrollbars to scroll and exit
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>
Just get rid of it. It's causing an error in all browsers. IE 8 is just a bit more aggressive when it comes to reporting errors.
If you want to know why, it's because:
document.getElementById("vmarquee")
The line right before the error line looks for an element that's not there. The next line, the error line, tries to assign style to it, a non-existent element, hence:
Object required
In Firefox's error console (which by default is turned off) it's:
Error: cross_marquee is null
Source File: pscompetitiveedge.com/leadership.html
Line: 93
In IE 8's developer tools it's:
SCRIPT5007: Unable to get value of the property 'style': object is null or undefined
leadership.html, line 93 character 1
Both of which are slightly more informative.
But as I say, just get rid of the script.
mlegg
11-29-2011, 09:15 PM
Thanks, I was using that script before I added the Conveyor belt slideshow script. I totally didn't think leaving that in the head would mess anything up. :(
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.