HighDots Forums  

How to get the height of a td?

alt.html alt.html


Discuss How to get the height of a td? in the alt.html forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
jpmorin196@gmail.com
 
Posts: n/a

Default How to get the height of a td? - 03-08-2006 , 05:33 AM






Hi im working on a web project for school and i cant get something
working...

I have a graph that i would like the height to be dynamic depending on
the height of a cell in a table (td)

the td has an id and no defined height because it is not fixed and can
be different.

i have tried many things and it always give me 0 (offsetHeight,
innerHeight...)

Anyone can help me?

Thank you!


Reply With Quote
  #2  
Old   
Jim Higson
 
Posts: n/a

Default Re: How to get the height of a td? - 03-08-2006 , 05:49 AM






jpmorin196 (AT) gmail (DOT) com wrote:

Quote:
Hi im working on a web project for school and i cant get something
working...

I have a graph that i would like the height to be dynamic depending on
the height of a cell in a table (td)

the td has an id and no defined height because it is not fixed and can
be different.

i have tried many things and it always give me 0 (offsetHeight,
innerHeight...)

Anyone can help me?
clientHeight?

Btw, you can see all the javascript properties of any element using the
Firefox DOM inspector.



Reply With Quote
  #3  
Old   
jpmorin196@gmail.com
 
Posts: n/a

Default Re: How to get the height of a td? - 03-08-2006 , 05:59 AM



clientHeight returns 0 too... it doesnt work


Reply With Quote
  #4  
Old   
jpmorin196@gmail.com
 
Posts: n/a

Default Re: How to get the height of a td? - 03-08-2006 , 02:25 PM



It doesnt work, it returns me 0 again...


Reply With Quote
  #5  
Old   
Neredbojias
 
Posts: n/a

Default Re: How to get the height of a td? - 03-08-2006 , 08:29 PM



With neither quill nor qualm, jpmorin196 (AT) gmail (DOT) com quothed:

Quote:
Hi im working on a web project for school and i cant get something
working...

I have a graph that i would like the height to be dynamic depending on
the height of a cell in a table (td)

the td has an id and no defined height because it is not fixed and can
be different.

i have tried many things and it always give me 0 (offsetHeight,
innerHeight...)

Anyone can help me?

Thank you!
Is there anything in the cell to begin with and is the table positioned?
(-A working/demo url would help.)

--
Neredbojias
Contrary to popular belief, it is believable.


Reply With Quote
  #6  
Old   
Jonathan N. Little
 
Posts: n/a

Default Re: How to get the height of a td? - 03-09-2006 , 12:31 AM



jpmorin196 (AT) gmail (DOT) com wrote:

Quote:
It doesnt work, it returns me 0 again...

Did you try BootNic's example? Works in MSIE5.0+ NN7.1+ Moz & FF and
Opera...

Now it will not work in legacy 4.x browsers and fails in the WebTV/MSN
TV views, so what are you testing with? Lets see a URL

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.