Table.clientHeight problem

J

juande

Hello,

I get some dynamic controls (ASP .Net) inside a table, the height
property of the table is variable according the controls loaded, so I
need to know the final table height, this value must be an odd number
by graphic design. I put the next code at bottom of the page;

<script type="text/javascript" language="JavaScript1.2">
if (document.getElementById("TABLE1").clientHeight%2 == 0)
document.getElementById("TABLE1").height =
document.getElementById("TABLE1").clientHeight + 1; </script>

Works fine in IE6 & IE7, in Firefox 2 and Opera 9 doesn't works, I've
checked with
alert(document.getElementById("TABLE1").height)
and I can see the result desired, but the height of the table remains
and doesn't change in the page. ¿Is there any solution for it works
in Firefox and Opera?

Many thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,800
Messages
2,569,657
Members
45,412
Latest member
HemantSod
Top