Re: offsetHeight issues with IE vs FireFox



On Oct 30, 6:11 pm, "lancebryant...@xxxxxxxxx"
<lancebryant...@xxxxxxxxx> wrote:
Hmm, Ive been googling and I cant seem to find a page that fixes my
problem nor does any page truely mention an issue with IE regarding
using the following code:

<code>
var contentPane = document.getElementById("myScrollContent");
alert(contentPane.offsetHeight);
</code>

The exact issue is that IE has this value at 0, and firefox has this
at 731 something pixels.

I have tried the following:

1) Tried forcing a &nbsp inside the myScrollContent Div.
2) Tried forcing a strict document standard type (i didnt' think this
one would work..)
3) Also tried forcing the display:block; display:inline; styles in the
style *** but this also did not work...

check outhttp://hps.myvnc.com/alloy/index.php?page=desert..

Much appreciated for your time to read this, and if you can help
please do :D

In IE 6 contentPane.offsetHeight is not available while the document
is loading. I confirmed this by placing
alert(contentPane.offsetHeight) in a function called report() that is
triggered by the onLoad event.

Good luck with changing your code.

Herbert

.


Quantcast