views:

27

answers:

1

When the window is resized, I need to know how big the table is, so I can dynamically fit everything else nicely in-between. The table height is solely dependant on the contents, which are loaded dynamically. How do you calculate the rendered height of the table in JavaScript?

+3  A: 

You can use element.offsetHeight for this.

var table = document.getElementById("tableId");
alert(table.offsetHeight);
BalusC