Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / HTML, CSS, Scripts / JavaScript / October 2007



Tip: Looking for answers? Try searching our database.

offsetHeight issues with IE vs FireFox

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
lancebryanthps@gmail.com - 31 Oct 2007 00:11 GMT
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 sheet but this also did not work...

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

Much appreciated for your time to read this, and if you can help
please do :D
lancebryanthps@gmail.com - 31 Oct 2007 00:35 GMT
On Oct 30, 5:11 pm, "lancebryant...@gmail.com"
<lancebryant...@gmail.com> 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
[quoted text clipped - 20 lines]
> Much appreciated for your time to read this, and if you can help
> please do :D

4) document.all['elementId'].offsetHeight <-- also failed.
David Mark - 31 Oct 2007 01:09 GMT
On Oct 30, 7:11 pm, "lancebryant...@gmail.com"
<lancebryant...@gmail.com> 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
[quoted text clipped - 11 lines]
>
> 1) Tried forcing a &nbsp inside the myScrollContent Div.

Why?

> 2) Tried forcing a strict document standard type (i didnt' think this
> one would work..)

You should do this anyway.

> 3) Also tried forcing the display:block; display:inline; styles in the
> style sheet but this also did not work...

That has nothing to do with it.

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

I am pretty sure that you have to wait for the page to finish loading
before offsetHeight will return anything meaningful.

> Much appreciated for your time to read this, and if you can help
> please do :D
Herbert Blenner - 31 Oct 2007 07:06 GMT
On Oct 30, 6:11 pm, "lancebryant...@gmail.com"
<lancebryant...@gmail.com> 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
[quoted text clipped - 20 lines]
> 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
lancebryanthps@gmail.com - 31 Oct 2007 17:58 GMT
Hi guys,

Thanks alot that fixed the problem.  Where in the heck would I google
to find information like that?  I found some sites that where helping
debug that issue and it seemed that multiple people where having an
issue with the same problem.. however it seems there issues where
actually unrelated.

Thanks again!

Lance
lancebryanthps@gmail.com - 31 Oct 2007 18:00 GMT
Thanks for the help guys its fixed.. just had to put it in the onload
like you suggested.

Thanks much :D
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.