Two column - equalColumns issue - Mozilla

<script type="text/javascript">
    function equalColumns(){
        var l = document.getElementById('navigation');
        var r = document.getElementById('pageContent');
        r.offsetHeight >= l.offsetHeight ? l.style.height = r.offsetHeight + "px" : r.style.height = l.offsetHeight + "px";
    }
</script>

<script type="text/javascript">
        equalColumns();
</script>

I’m having an issue with my equalColumn script with this layout
http://esrgc.org/test/

In IE it seems to work fine. However in Mozilla, when the page is first loaded the left “navigation” column does not equal the “content” column? Although if you refresh the page, it does. Can anyone help me with this. I’m currently in the process of learning JS, but I’m not versed enough to figure out this simple script issue.

Thank you for your help.

wheatleyweb

why are you using this technique for something as simple as:

#navigation { width: xxx; }
#pageContent { width: xxx; }

[quote=fasterthanlight™;2345841]why are you using this technique for something as simple as:

#navigation { width: xxx; }
#pageContent { width: xxx; }[/quote]

x2 :look:

[QUOTE=fasterthanlight™;2345841]why are you using this technique for something as simple as:

#navigation { width: xxx; }
#pageContent { width: xxx; }[/QUOTE]

[QUOTE=redelite;2345844]x2 :look:[/QUOTE]
Sounds to me as if he’s has one column that can be dynamically ‘x’ height and he wants the second column to be equal to the first column, which can’t just be done via css.

You may want to look into runonload and try wrapping your script in that:
http://www.davidflanagan.com/javascript5/display.php?n=17-7&f=17/runOnLoad.js

oh… height… LOL man I’m blind… :lol:

Hahahahahahahyahahahahahahah oh man, faster needs moar coffeez

Sounds to me as if he’s has one column that can be dynamically ‘x’ height and he wants the second column to be equal to the first column, which can’t just be done via css.
but I thought thats what faux-columns were for ?

*edit: ahh… looked at the layout again, yea those round corners would break any faux-column action. Damn, I’m not on the ball today, thats fo’sho

Yer, kinna like http://www.alistapart.com/articles/fauxcolumns/

yea most of the time faux columns work. there are occasions that do require a more intricate solution. this i believe would be one of those times.

Indeed, Blasted round corners!!

[quote=simplistik;2345882]Sounds to me as if he’s has one column that can be dynamically ‘x’ height and he wants the second column to be equal to the first column, which can’t just be done via css.

You may want to look into runonload and try wrapping your script in that:
http://www.davidflanagan.com/javascript5/display.php?n=17-7&f=17/runOnLoad.js[/quote]

Thanks simplistic! I’ll take a look at that. I’m glad I was not totally off. Again, I’m learning (teaching myself) this stuff guys. Take it easy on the greenhorn! LOL

and yes… “pageContent” is sized to the content length so I need something to ensure that “navigation” column matches its height. It just seemed weird to me that it works flawlessly in IE, and displays properly in Mozilla after a refresh.