Posted by BootNic on 03/08/06 15:54
> "jpmorin196@gmail.com" <jpmorin196@gmail.com> wrote:
> news:1141813992.028123.52860@p10g2000cwp.googlegroups.com....
>
> 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...)
>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<script type="text/javascript">
function getHeight(){
alert(document.getElementById('ex1').offsetHeight);
}
</script>
<title></title>
</head>
<body>
<table summary="" border="1">
<tbody>
<tr>
<td id="ex1" onclick="getHeight()">example</td>
</tr>
</tbody>
</table>
</body>
</html>
--
BootNic Wednesday, March 08, 2006 8:53 AM
Humor is emotional chaos remembered in tranquility.
*James Thurber*
Navigation:
[Reply to this message]
|