|
-
Jul 25th, 2001, 07:46 AM
#1
Thread Starter
Fanatic Member
HTML error?
I am getting a strange Error message from my site saying that there is "Object Required".
Here is the section of code it is referring to (the section in bold is the area it said is the problem.):
nest=(!nest) ? '':'document.'+nest+'.'
this.el=bw.dom?document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?eval(nest+'document.'+obj):0;
this.css=bw.dom?document.getElementById(obj).style:bw.ie4?document.all[obj].style:bw.ns4?eval(nest+'document.'+obj):0;
this.scrollHeight=bw.ns4?this.css.document.height:this.el.offsetHeight
this.clipHeight=bw.ns4?this.css.clip.height:this.el.offsetHeight
this.up=MoveAreaUp;this.down=MoveAreaDown;
this.MoveArea=MoveArea; this.x; this.y;
this.obj = obj + "Object"
eval(this.obj + "=this")
return this
Any clues?
-
Jul 25th, 2001, 10:11 AM
#2
PowerPoster
is css (this.css) something you created as a class? because i was unaware of that method
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
-
Jul 25th, 2001, 10:56 AM
#3
Thread Starter
Fanatic Member
I believe that it was... but this error is the only error on the site... its just bugging me and I don't know what it is....
-
Jul 25th, 2001, 04:11 PM
#4
PowerPoster
hmmm...it's kind of hard to tell, because it looks like you have several elements from different classes interacting together, and it is hard to see the foundations of the classes without the code.
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
-
Jul 26th, 2001, 03:39 AM
#5
Thread Starter
Fanatic Member
I will put up the code for the page in about 2 - 3 hours as my machine is currently being used in a meeting (as it is the most powerful machine in the building - I built it myself). But when it comes back I will post the whole page of code so you can have a look.... it is really puzzling me..
-
Jul 26th, 2001, 07:54 AM
#6
Thread Starter
Fanatic Member
Here is the code for the entire page......... I dont know what is wrong.... I hope that someone can see where this chuffing error is coming from.
<html>
<head>
<title>Welcome to Medical Marketing Research</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
body{font-family:Arial;}
#divUpControl{position:absolute; width:320; left:10; top:10; z-index:1; text-align: right}
#divDownControl{position:absolute; width:320; left:10; top:270; z-index:1; text-align: right}
#divContainer{position:absolute; width:320; height:240; overflow:hidden; top:30; left:10; clip:rect(0,320,240,0); visibility:hidden}
#divContent{position:absolute; top:0; left:0}
</style>
<SCRIPT LANGUAGE="JavaScript1.2" SRC="javascripts/menu.js"></SCRIPT>
<SCRIPT LANGUAGE="JavaScript1.2" SRC="javascripts/mymenus.js"></SCRIPT>
<script language="JavaScript">
function verifyCompatibleBrowser(){
this.ver=navigator.appVersion
this.dom=document.getElementById?1:0
this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0;
this.ie4=(document.all && !this.dom)?1:0;
this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0;
this.ns4=(document.layers && !this.dom)?1:0;
this.bw=(this.ie5 || this.ie4 || this.ns4 || this.ns5)
return this
}
bw=new verifyCompatibleBrowser()
var speed=50
var loop, timer
function ConstructObject(obj,nest){
nest=(!nest) ? '':'document.'+nest+'.'
this.el=bw.dom?document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?eval(nest+'document.'+obj):0;
this.css=bw.dom?document.getElementById(obj).style:bw.ie4?document.all[obj].style:bw.ns4?eval(nest+'document.'+obj):0;
this.scrollHeight=bw.ns4?this.css.document.height:this.el.offsetHeight
this.clipHeight=bw.ns4?this.css.clip.height:this.el.offsetHeight
this.up=MoveAreaUp;this.down=MoveAreaDown;
this.MoveArea=MoveArea; this.x; this.y;
this.obj = obj + "Object"
eval(this.obj + "=this")
return this
}
function MoveArea(x,y){
this.x=x;this.y=y
this.css.left=this.x
this.css.top=this.y
}
function MoveAreaDown(move){
if(this.y>-this.scrollHeight+objContainer.clipHeight){
this.MoveArea(0,this.y-move)
if(loop) setTimeout(this.obj+".down("+move+")",speed)
}
}
function MoveAreaUp(move){
if(this.y<0){
this.MoveArea(0,this.y-move)
if(loop) setTimeout(this.obj+".up("+move+")",speed)
}
}
function PerformScroll(speed){
if(initialised){
loop=true;
if(speed>0) objScroller.down(speed)
else objScroller.up(speed)
}
}
function CeaseScroll(){
loop=false
if(timer) clearTimeout(timer)
}
var initialised;
function InitialiseScrollableArea(){
objContainer=new ConstructObject('divContainer')
objScroller=new ConstructObject('divContent','divContainer')
objScroller.MoveArea(0,0)
objContainer.css.visibility='visible'
initialised=true;
}
// end absolutely positioned scrollable area object scripts
</script>
<script language="JavaScript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
// -->
</script>
</head>
<body bgcolor="#FFFFFF" text="#000000" onLoad="InitialiseScrollableArea()" background="images/welcomeside.jpg" link="#FFFFFF">
<div id="Layer1" style="position:absolute; width:200px; height:115px; z-index:-1; left: -3px; top: 27px"><img src="images/speechbubbles.gif" width="752" height="494" usemap="#Map" border="0">
<map name="Map">
<area shape="rect" coords="325,78,596,148" href="opex.asp" target="main">
<area shape="rect" coords="79,136,324,197" href="background.asp" target="main">
<area shape="rect" coords="35,282,268,376" href="advise.asp" target="main">
<area shape="rect" coords="514,197,699,287" href="http://www.tpi-courses.com" target="_blank">
</map>
</div>
<div id="Layer2" style="position:absolute; width:145px; height:115px; z-index:3; left: 312px; top: 316px">
<div align="left"><a href="#"><img src="images/mascot.gif" width="159" height="141" border="0" onClick="javascript:window.open('flash/asteroids.swf',menubar='no',status='no',toolbar='no')";
></a></div>
</div>
</body>
<script language="JavaScript">
<!--
//For IE
if (document.all) {
loadMenus();
}
//-->
</script>
</html>
-
Jul 30th, 2001, 04:20 AM
#7
Thread Starter
Fanatic Member
Noone? Does anyone know why there is an Error on this page?
-
Jul 30th, 2001, 04:45 PM
#8
if I run that code I will get the error?? nope it runs just fine for me. I am using IE5.0 as well. do I have to click on anything or just wait until it pops up 
never mind I found it. let me get back to ya stupid me
-
Jul 30th, 2001, 05:48 PM
#9
ok look at this and tell me what is wrong with it.
Code:
return this
}
bw=new verifyCompatibleBrowser() {
var speed=50
var loop, timer
}
function ConstructObject(obj,nest){
nest=(!nest) ? '':'document.'+nest+'.'
I added the bold brackets and it runs fine, except I think I get the error for the javascript menu not being there.
now I don't know if there are suppose to be there but I don't get that error any more from that line. try that and let me know.
-
Jul 31st, 2001, 03:12 AM
#10
Thread Starter
Fanatic Member
Cheers Scoutt... Well I also no longer get the error from that line... Instead it has moved to line 99 Character 1 with another expected object....
The line that starts the image map of the image that is in a layer... Could it be the image i'm using or the image maps?
-
Jul 31st, 2001, 09:13 AM
#11
I got that one as well, I though it was becasue I didn't have the menu scripts. well back to the drawing board. I look at it later again in more detail.
-
Jul 31st, 2001, 08:23 PM
#12
have you tried running that in NS? without the fix I did, only the original code you supplied, this is what netscape said.
Code:
JavaScript Error: line 37:
this.css has no properties.
and the line is this one.
this.scrollHeight=bw.ns4?this.css.document.height:this.el.offsetHeight
I am not too familiar with javascript, at this extreme, so I can only suggest hints. maybe some one else that knoes javascript can help as I am out of options. sorry bud.
I suspect IE is saying the same thing.
-
Aug 1st, 2001, 04:44 AM
#13
Lively Member
-
Aug 2nd, 2001, 09:33 AM
#14
Thread Starter
Fanatic Member
Cheers for your help benski.. I will have a good look at what you have said and the code.. and hopefully we will crack this problem.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|