[thelist] onLoad/Firefox issue

Pringle, Ron RPringle at aurora-il.org
Wed Feb 20 13:29:04 CST 2008


I am working on a Joomla 1.5 site and am utilizing the wrapper function to wrap some forums (Vanilla) in an iframe. Joomla calls onLoad to fire a function that determines the height of the page and adjusts the iFrame to fit.


Works fine in IE6. However, googling seems to give the impression that Firefox does not recognize onLoad, or perhaps it just calls it too late in the page load sequence, and so fails to call the function and resize the iFrame dynamically.

I've located the PHP function code within Joomla that does all of this:

// auto height control
        if ( $this->params->def( 'height_auto' ) ) {
                $this->wrapper->load = 'onload="iFrameHeight()"';
        } else {
                $this->wrapper->load = '';

Via google I came across Dean Edwards' post [1] about sniffing for document.addEventListener and then initializing DOMContentLoaded, which I assume I could use to replace the onload above, but I just don't quite understand how it all works.

Bottom line is that I need the height of the iFrame to adjust to the content dynamically in Firefox the same way it does in IE. Am I on the right track or barking up the wrong tree (or in a whole nuther forest)?

Any pointers, links to appropriate info, code snippets or slaps in the head would be appreciated!


[1] http://dean.edwards.name/weblog/2005/09/busted/

More information about the thelist mailing list