Top Left Text cha

Web & App Development

I've noticed for a while that the auto height doesn't work most of the time on the core wrapper module in Joomla.  Even in the latest edition (3.4 at the time of writing this), it hasn't been fixed.  I found a post in the Joomla forums with a fix that usually works...

<script type="text/javascript">
function iFrameHeight() {
  var f = document.getElementById('blockrandom');
  f.style.height = '100px' ;
  var d = (f.contentWindow.document || f.contentDocument) ;
  var height = Math.max(d.body.offsetHeight, d.body.scrollHeight) ;
  height += 200; // scrollbars?
  f.style.height = height + 'px' ;
  f.setAttribute("height", height) ;
}
</script>
<iframe <?php echo $load; ?>
   id="blockrandom"
   name="<?php echo $target ?>"
   src="<?php echo $url; ?>"
   width="<?php echo $width ?>"
   height="<?php echo $height ?>"
   scrolling="<?php echo $scroll ?>"
   class="wrapper<?php echo $moduleclass_sfx ?>" >
   <?php echo JText::_('MOD_WRAPPER_NO_IFRAMES'); ?>
</iframe>

Add comment


Security code
Refresh

Leave your comments

Post comment as a guest

0
Your comments are subjected to administrator's moderation.
X