SitePoint Sponsor |
|
User Tag List
Results 1 to 19 of 19
Thread: "Object Required"?
-
Oct 15, 2001, 09:24 #1
- Join Date
- Sep 2001
- Location
- London
- Posts
- 129
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
"Object Required"?
What does this mean? I cant work out whats wrong with my javascript. If anyone could help I would be very greatful.
-
Oct 15, 2001, 09:28 #2
- Join Date
- Jun 2001
- Location
- Toronto, Canada
- Posts
- 9,123
- Mentioned
- 2 Post(s)
- Tagged
- 0 Thread(s)
You are calling a function or another object that doesn't exist.
Most common mistake: Calling a function, but getting the caps or name wrong.
What page is this on?
-
Oct 15, 2001, 09:31 #3
- Join Date
- Sep 2001
- Location
- London
- Posts
- 129
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
var width, height, x, y;
if(document.all)//for IE
{
width=document.body.clientWidth;
height=document.body.clientHeight;
}
else if (document.layers) //for NS
{
width=window.innerWidth;
height=window.innerHeight;
}
-
Oct 15, 2001, 09:32 #4
- Join Date
- Jun 2001
- Location
- Toronto, Canada
- Posts
- 9,123
- Mentioned
- 2 Post(s)
- Tagged
- 0 Thread(s)
Can you upload the actual page so I can have a look and play around? You'd be surprised where the error might be
-
Oct 15, 2001, 09:36 #5
- Join Date
- Sep 2001
- Location
- London
- Posts
- 129
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Okay, but it will take about 15 mins
-
Oct 15, 2001, 09:47 #6
- Join Date
- Sep 2001
- Location
- London
- Posts
- 129
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I've done it it's here Thankyou in advance
-
Oct 15, 2001, 09:56 #7
- Join Date
- Jun 2001
- Location
- Toronto, Canada
- Posts
- 9,123
- Mentioned
- 2 Post(s)
- Tagged
- 0 Thread(s)
Code:if (document.all) //for IE { // width=document.body.clientWidth; // height=document.body.clientHeight; }
-
Oct 15, 2001, 09:57 #8
- Join Date
- Jun 2001
- Location
- Toronto, Canada
- Posts
- 9,123
- Mentioned
- 2 Post(s)
- Tagged
- 0 Thread(s)
Yeah, it is.
-
Oct 15, 2001, 10:01 #9
- Join Date
- Sep 2001
- Location
- London
- Posts
- 129
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
The problem is, that I need to find out how wide the inside of the window is so I can find out where the layer should go. I put up another post here asking how I could do it, and they gave me this code. What's funny is I tried it, and it worked, but when I put it in the page it stopped working.
I don't know what's going on.
-
Oct 15, 2001, 10:03 #10
- Join Date
- Jun 2001
- Location
- Toronto, Canada
- Posts
- 9,123
- Mentioned
- 2 Post(s)
- Tagged
- 0 Thread(s)
I've never seen clientWidth before, personally...
-
Oct 15, 2001, 10:06 #11
- Join Date
- Mar 2001
- Location
- In a van... down by the river.
- Posts
- 366
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
i gave him the clientwidth code, it works. i have used it before.
here is my little test script for it that i wrote awhile back..
Code:<html> <head> </head> <body> <script language="javascript"> if(document.all) { imgwidth=document.body.clientWidth; } else if(document.layers) { imgwidth=window.innerWidth; } imgwidth = imgwidth - 30 document.write("<img src='picture.gif' width='" + imgwidth +"' height='30'>") </script> </body> </html>
Some say the world will end in fire, Some say in ice.
From what I've tasted of desire
I hold with those who favor fire.
-
Oct 15, 2001, 10:07 #12
- Join Date
- Jun 2001
- Location
- Toronto, Canada
- Posts
- 9,123
- Mentioned
- 2 Post(s)
- Tagged
- 0 Thread(s)
I dunno, might be cause it's in the head (this body isn't instantiated), just saying I've never seen it, hence I can't troubleshoot it
-
Oct 15, 2001, 10:10 #13
- Join Date
- Mar 2001
- Location
- In a van... down by the river.
- Posts
- 366
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally posted by Jeremy W.
I dunno, might be cause it's in the head (this body isn't instantiated)...Some say the world will end in fire, Some say in ice.
From what I've tasted of desire
I hold with those who favor fire.
-
Oct 15, 2001, 10:11 #14
- Join Date
- Jul 2001
- Location
- Scotland
- Posts
- 4,836
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I'm having a look at it.
-
Oct 15, 2001, 10:12 #15
- Join Date
- Jun 2001
- Location
- Toronto, Canada
- Posts
- 9,123
- Mentioned
- 2 Post(s)
- Tagged
- 0 Thread(s)
Thanx D
-
Oct 15, 2001, 10:15 #16
- Join Date
- Sep 2001
- Location
- London
- Posts
- 129
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Hey
Thanks. I just put it in the body instead and now it's working. Thanks a lot. I've got to take it down now.
Marek
-
Oct 15, 2001, 10:17 #17
- Join Date
- Jul 2001
- Location
- Scotland
- Posts
- 4,836
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Sorry, I took so long, had a meeting.
Oh well, you got it.
-
Oct 15, 2001, 10:19 #18
- Join Date
- Jun 2001
- Location
- Toronto, Canada
- Posts
- 9,123
- Mentioned
- 2 Post(s)
- Tagged
- 0 Thread(s)
:gets jiggy wif it:
-
Oct 15, 2001, 11:36 #19
- Join Date
- Mar 2001
- Location
- In a van... down by the river.
- Posts
- 366
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally posted by Jeremy W.
:gets jiggy wif it:
I guess the men in the white coats go lost on there way to get you.Some say the world will end in fire, Some say in ice.
From what I've tasted of desire
I hold with those who favor fire.
Bookmarks