|
-
Oct 7th, 2002, 03:12 PM
#1
Thread Starter
Frenzied Member
(Javascript) Object doesn't support this property or method? **Resolved**
What is wrong with this line? I am getting the error "Object doesn't support this property or method"
Code:
document.getElementByID('propertyinvoiceDivHead').scrollLeft=document.getElementByID('propertyinvoiceDivBody').scrollLeft;
thanks
Michael
Last edited by msimmons; Oct 16th, 2002 at 04:13 PM.
I'm off to GalahTech, hope to see you there.
If you don't like the rules they make, refuse to play their game. -- Steve Ignorant.
-
Oct 7th, 2002, 03:51 PM
#2
Thread Starter
Frenzied Member
ok here is my working function but is it proper?
Code:
function f_doScroll($1,$2){
oDivHead=document.all($2);
oDivBody=document.all($1);
oDivHead.scrollLeft=oDivBody.scrollLeft;
}
thx
ms
I'm off to GalahTech, hope to see you there.
If you don't like the rules they make, refuse to play their game. -- Steve Ignorant.
-
Oct 8th, 2002, 03:01 AM
#3
Fanatic Member
document.all isn't in the standard DOM, it's an IE only feature. What exactly are you trying to do?
-
Oct 8th, 2002, 06:01 AM
#4
Frenzied Member
Re: (Javascript) Object doesn't support this property or method?
Originally posted by msimmons
Code:
document.getElementByID('propertyinvoiceDivHead').scrollLeft=document.getElementByID('propertyinvoiceDivBody').scrollLeft;
I think you should lower case the d in ID, that may be the cause.
-
Oct 8th, 2002, 06:47 AM
#5
Fanatic Member
i didn't see that, well done. Yeah, it won't work unless it's getElementById
-
Oct 8th, 2002, 09:00 AM
#6
Thread Starter
Frenzied Member
And I always do that too... (the ID rather than Id). What I am doing is I have tabular data that needs a 'sticky' header row so I am doing it w/two div's w/tables in them so if the data gets too wide and the botom (data) scrolls left to right then the top (headers) will scroll simutaniously.
Thanks guys (you two are the HTML/Javascript gurus )
Michael
I'm off to GalahTech, hope to see you there.
If you don't like the rules they make, refuse to play their game. -- Steve Ignorant.
-
Oct 8th, 2002, 09:01 AM
#7
Frenzied Member
I made that mistake when I first learnt about getElementById too, so I would spot it And as you said earlier all should be getElementById in the other function too to be cross-browser.
-
Oct 8th, 2002, 09:03 AM
#8
Thread Starter
Frenzied Member
Yeah, I'll be changing it back cos like I said in that other post (yesterday i think?) that I am trying to code to standards now.
ms
I'm off to GalahTech, hope to see you there.
If you don't like the rules they make, refuse to play their game. -- Steve Ignorant.
-
Oct 8th, 2002, 09:05 AM
#9
Frenzied Member
-
Oct 8th, 2002, 09:09 AM
#10
Thread Starter
Frenzied Member
yeah, you two just seem to always be the ones to answer... I haven't seen CiberTHuG in a long time.
I'm off to GalahTech, hope to see you there.
If you don't like the rules they make, refuse to play their game. -- Steve Ignorant.
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
|