nskate
03-31-2008, 02:09 PM
ahhggg
Ok I have a div in an HTML and the contents of that div is dynamic... a script populates the data inside the div.
I NEED to get the height of that div with the dynamic content and there seems to be no way I can get this. Below is my code both HTML and Javascript:
<html>
<body>
<div id="mydiv"> ---- in here data is populated using PHP scripting --- </div>
<script>
div_height = ocument.getElementById('mydiv').offsetHeight ;
</script>
</body>
</html>
I tried to use .offsetHeight, .height, .contentHeight and they ALL return a ZERO. Dont forget that the data inside the <div> is populated dynamically so the height of the div will change. Is there any way to get the height of that div after the data gets populated?
Thank you in advance :)
Nate
Ok I have a div in an HTML and the contents of that div is dynamic... a script populates the data inside the div.
I NEED to get the height of that div with the dynamic content and there seems to be no way I can get this. Below is my code both HTML and Javascript:
<html>
<body>
<div id="mydiv"> ---- in here data is populated using PHP scripting --- </div>
<script>
div_height = ocument.getElementById('mydiv').offsetHeight ;
</script>
</body>
</html>
I tried to use .offsetHeight, .height, .contentHeight and they ALL return a ZERO. Dont forget that the data inside the <div> is populated dynamically so the height of the div will change. Is there any way to get the height of that div after the data gets populated?
Thank you in advance :)
Nate