[Javascript] setting 'height' attribute of <TD> tag?

Peter-Paul Koch gassinaumasis at hotmail.com
Thu Jun 28 04:31:46 CDT 2001



>how do I get the 'height' attribute of a <TD
>heigh="100"> tag??
>
>also, is it possible to change the attribute value??
>
>(i need a solution for both NS4+ and IE4+)

Netscape 4: forget it.

Other browsers:

document.getElementById('ID_of_TD').offsetHeight (IE5/NN6)
document.all['ID_of_TD].offsetHeight (IE4)

You have to give the TD a unique ID.

>my other idea was to put a spacer.gif image in an
>empty table cell, and then change the height attribute
>of the image, but the o'reilly book says it's "read"
>only attribute.

Correct.

ppk

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.





More information about the Javascript mailing list