Iframe error on height 100% in IE9 - Solution

General questions relating to Joomla! 2.5. Note: All 1.6 and 1.7 releases have reached end of life and should be updated to 2.5. There are other boards for more specific help on Joomla! features and extensions.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting.
Forum Post Assistant - If you are serious about wanting help, you should use this tool to help you post.
OnzeDanny
Joomla! Intern
Joomla! Intern
Posts: 72
Joined: Sun Jan 23, 2011 11:52 am
Location: Belgium - Tongeren

Re: Iframe error on height 100% in IE9 - Solution

Post by OnzeDanny » Sat Aug 27, 2011 2:35 pm

I a still busy to develop a FINAL solution for ALL browsers.
So please be patient, i will post here a comment when its done ;)
PiMaG is no longer being developed or supported.

enzo24
Joomla! Apprentice
Joomla! Apprentice
Posts: 16
Joined: Fri Sep 12, 2008 6:34 am

Re: Iframe error on height 100% in IE9 - Solution

Post by enzo24 » Wed Aug 31, 2011 8:12 am

Strangly enough, everything works ok on FF5 and IE8... I'm holdin' on to my britches waiting for a soluce for FF6 & IE8 ! Thanks all :)

OnzeDanny
Joomla! Intern
Joomla! Intern
Posts: 72
Joined: Sun Jan 23, 2011 11:52 am
Location: Belgium - Tongeren

Re: Iframe error on height 100% in IE9 - Solution

Post by OnzeDanny » Wed Aug 31, 2011 9:16 am

This is what i have done:

1) removed all "IE" notifiers and "<script type="text/javascript">"

So this is the FIRST result is only this code who remains:

Code: Select all

<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>
2) ABOVE THIS CODE, i have added:

Code: Select all

<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 += 20; // scrollbars?
  f.style.height = height + 'px' ;
  f.setAttribute("height", height) ;
}
</script>
You can see the result here: http://wistudat.onzeplaats.be/wrap.php
It load the complete website into the wrapper.
Can somebody TEST my URL with IE9, because i run LINUX ..... :-[
In FF6 it works well ;)

And IF it works also in IE, you can apply the code into Joomla ;)
PiMaG is no longer being developed or supported.

Woosha
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Tue Mar 03, 2009 10:52 am

Re: Iframe error on height 100% in IE9 - Solution

Post by Woosha » Wed Aug 31, 2011 12:34 pm

Your link worked in IE9

Code: Select all

<?php
/**
 * @version		$Id: default.php 21391 2011-05-26 17:46:12Z dextercowley $
 * @package		Joomla.Site
 * @subpackage	com_wrapper
 * @copyright	Copyright (C) 2005 - 2011 Open Source Matters, Inc. All rights reserved.
 * @license		GNU General Public License version 2 or later; see LICENSE.txt
 */

// no direct access
defined('_JEXEC') or die;
?>

<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 += 20; // scrollbars?
  f.style.height = height + 'px' ;
  f.setAttribute("height", height) ;
}
</script>

<div class="contentpane<?php echo $this->pageclass_sfx; ?>">
<?php if ($this->params->get('show_page_heading', 1)) : ?>
	<h1>
		<?php if ($this->escape($this->params->get('page_heading'))) :?>
			<?php echo $this->escape($this->params->get('page_heading')); ?>
		<?php else : ?>
			<?php echo $this->escape($this->params->get('page_title')); ?>
		<?php endif; ?>
	</h1>
<?php endif; ?>
<iframe <?php echo $this->wrapper->load; ?>
	id="blockrandom"
	name="iframe"
	src="<?php echo $this->escape($this->wrapper->url); ?>"
	width="<?php echo $this->escape($this->params->get('width')); ?>"
	height="<?php echo $this->escape($this->params->get('height')); ?>"
	scrolling="<?php echo $this->escape($this->params->get('scrolling')); ?>"
	class="wrapper<?php echo $this->pageclass_sfx; ?>">
	<?php echo JText::_('COM_WRAPPER_NO_IFRAMES'); ?>
</iframe>
</div>
I tried this and it works for FF6.0.1 and IE9.0.8112

OnzeDanny
Joomla! Intern
Joomla! Intern
Posts: 72
Joined: Sun Jan 23, 2011 11:52 am
Location: Belgium - Tongeren

Re: Iframe error on height 100% in IE9 - Solution

Post by OnzeDanny » Wed Aug 31, 2011 12:41 pm

Woosha wrote:Your link worked in IE9

Code: Select all

<?php
/**
 * @version		$Id: default.php 21391 2011-05-26 17:46:12Z dextercowley $
 * @package		Joomla.Site
 * @subpackage	com_wrapper
 * @copyright	Copyright (C) 2005 - 2011 Open Source Matters, Inc. All rights reserved.
 * @license		GNU General Public License version 2 or later; see LICENSE.txt
 ******************************************
*******************************
**********************
</div>
I tried this and it works for FF6.0.1 and IE9.0.8112
This is GOOD news!
Thanks Woosha to help me out wit IE9!

For the people who like it into an HTML page (for your site)
This is the code

Code: Select all

<center><b>This is an example for the Joomla Wrapper</center></b><br/>
<center>BEGIN WRAPPER<br/>
</center>

<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 += 20; // scrollbars?
  f.style.height = height + 'px' ;
  f.setAttribute("height", height) ;
}
</script>

<div>
<iframe onload="iFrameHeight()"	id="blockrandom"
	frameborder="0"
	name="iframe"
	src="http://www.YOURSITE/index.php"
	width="100%"
	height="50"
	scrolling="no"
	class="wrapper">
</iframe>
</div>
<center>Be patient, while the page is loading<br/>END WRAPPER</center>
Please notice that this only works at your OWN domain.
External links with iframe is impossible with this script.


You can try this script at this URL: http://wistudat.onzeplaats.be/wrap.php
;) Danny
PiMaG is no longer being developed or supported.

jsiout
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Sat Aug 27, 2011 7:52 am

Re: Iframe error on height 100% in IE9 - Solution

Post by jsiout » Wed Aug 31, 2011 2:23 pm

Thanks !!! In which pages we must paste this code ?

OnzeDanny
Joomla! Intern
Joomla! Intern
Posts: 72
Joined: Sun Jan 23, 2011 11:52 am
Location: Belgium - Tongeren

Re: Iframe error on height 100% in IE9 - Solution

Post by OnzeDanny » Wed Aug 31, 2011 2:29 pm

Please read here for instructions.
Just use the new code instead the code mentioned one on that page.
Regards, Danny 8)
PiMaG is no longer being developed or supported.

jsiout
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Sat Aug 27, 2011 7:52 am

Re: Iframe error on height 100% in IE9 - Solution

Post by jsiout » Wed Aug 31, 2011 3:34 pm

This code is for component... what about module ???

OnzeDanny
Joomla! Intern
Joomla! Intern
Posts: 72
Joined: Sun Jan 23, 2011 11:52 am
Location: Belgium - Tongeren

Re: Iframe error on height 100% in IE9 - Solution

Post by OnzeDanny » Wed Aug 31, 2011 4:47 pm

Almost same story for module:

1) removed all "IE" notifiers and "<script type="text/javascript">"

So this is the FIRST result is only this code who remains:

Code: Select all

<div class="contentpane<?php echo $this->pageclass_sfx; ?>">
<?php if ($this->params->get('show_page_heading', 1)) : ?>
   <h2>
      <?php if ($this->escape($this->params->get('page_heading'))) :?>
         <?php echo $this->escape($this->params->get('page_heading')); ?>
      <?php else : ?>
         <?php echo $this->escape($this->params->get('page_title')); ?>
      <?php endif; ?>
   </h2>
<?php endif; ?>

<iframe <?php echo $this->wrapper->load; ?>
   id="blockrandom"
   name="iframe"
        src="<?php echo $this->escape($phpbbgo); ?>"
   width="<?php echo $this->escape($this->params->get('width')); ?>"
   height="<?php echo $this->escape($this->params->get('height')); ?>"
   scrolling="<?php echo $this->escape($this->params->get('scrolling')); ?>"
   frameborder="0"
   class="wrapper<?php echo $this->pageclass_sfx; ?>">
   <?php echo JText::_('COM_WRAPPER_NO_IFRAMES'); ?>
</iframe>

</div>
2) Above this code add:

Code: Select all

<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 += 20; // scrollbars?
  f.style.height = height + 'px' ;
  f.setAttribute("height", height) ;
}
</script>
That's all.
The code works for: Joomla / PHP and HTML pages.
Just replace your existing Java code with the new one ;)

Regards, Danny
PiMaG is no longer being developed or supported.

jsiout
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Sat Aug 27, 2011 7:52 am

Re: Iframe error on height 100% in IE9 - Solution

Post by jsiout » Wed Aug 31, 2011 4:59 pm

1) this is my component file /httpdocs/components/com_wrapper/views/wrapper/tmpl/default.php

<?php
/**
* @version $Id: default.php 21391 2011-05-26 17:46:12Z dextercowley $
* @package Joomla.Site
* @subpackage com_wrapper
* @copyright Copyright (C) 2005 - 2011 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

// no direct access
defined('_JEXEC') or die;
?>

<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 += 20; // scrollbars?
f.style.height = height + 'px' ;
f.setAttribute("height", height) ;
}
</script>

<div class="contentpane<?php echo $this->pageclass_sfx; ?>">
<?php if ($this->params->get('show_page_heading', 1)) : ?>
<h1>
<?php if ($this->escape($this->params->get('page_heading'))) :?>
<?php echo $this->escape($this->params->get('page_heading')); ?>
<?php else : ?>
<?php echo $this->escape($this->params->get('page_title')); ?>
<?php endif; ?>
</h1>
<?php endif; ?>
<iframe <?php echo $this->wrapper->load; ?>
id="blockrandom"
name="iframe"
src="<?php echo $this->escape($this->wrapper->url); ?>"
width="<?php echo $this->escape($this->params->get('width')); ?>"
height="<?php echo $this->escape($this->params->get('height')); ?>"
scrolling="<?php echo $this->escape($this->params->get('scrolling')); ?>"
class="wrapper<?php echo $this->pageclass_sfx; ?>">
<?php echo JText::_('COM_WRAPPER_NO_IFRAMES'); ?>
</iframe>
</div>

2) this is my module file /httpdocs/modules/mod_wrapper/tmpl/default.php

<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 += 20; // scrollbars?
f.style.height = height + 'px' ;
f.setAttribute("height", height) ;
}
</script>

<div class="contentpane<?php echo $this->pageclass_sfx; ?>">
<?php if ($this->params->get('show_page_heading', 1)) : ?>
<h2>
<?php if ($this->escape($this->params->get('page_heading'))) :?>
<?php echo $this->escape($this->params->get('page_heading')); ?>
<?php else : ?>
<?php echo $this->escape($this->params->get('page_title')); ?>
<?php endif; ?>
</h2>
<?php endif; ?>

<iframe <?php echo $this->wrapper->load; ?>
id="blockrandom"
name="iframe"
src="<?php echo $this->escape($phpbbgo); ?>"
width="<?php echo $this->escape($this->params->get('width')); ?>"
height="<?php echo $this->escape($this->params->get('height')); ?>"
scrolling="<?php echo $this->escape($this->params->get('scrolling')); ?>"
frameborder="0"
class="wrapper<?php echo $this->pageclass_sfx; ?>">
<?php echo JText::_('COM_WRAPPER_NO_IFRAMES'); ?>
</iframe>

</div>

my page URL : http://www.hostingservices.gr/index.php ... ame-search

i get HTTP 500 error !!!

What i made wrong ???

Thanks a lot for your help !!!

msartor
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Thu Aug 25, 2011 9:49 am

Re: Iframe error on height 100% in IE9 - Solution

Post by msartor » Wed Aug 31, 2011 5:30 pm

Hi Danny,

works like a charm for me in FF6 and IE9. Just take care not to confuse code for module and component.

Here the working code for component (I use as a template override):

Code: Select all

<?php
/**
 * @version		$Id: default.php 21391 2011-05-26 17:46:12Z dextercowley $
 * @package		Joomla.Site
 * @subpackage	com_wrapper
 * @copyright	Copyright (C) 2005 - 2011 Open Source Matters, Inc. All rights reserved.
 * @license		GNU General Public License version 2 or later; see LICENSE.txt
 */

// no direct access
defined('_JEXEC') or die;
?>
<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 += 20; // scrollbars?
  f.style.height = height + 'px' ;
  f.setAttribute("height", height) ;
}
</script>

<div class="contentpane<?php echo $this->pageclass_sfx; ?>">
<?php if ($this->params->get('show_page_heading', 1)) : ?>
<h1>
<?php if ($this->escape($this->params->get('page_heading'))) :?>
<?php echo $this->escape($this->params->get('page_heading')); ?>
<?php else : ?>
<?php echo $this->escape($this->params->get('page_title')); ?>
<?php endif; ?>
</h1>
<?php endif; ?>
<iframe <?php echo $this->wrapper->load; ?>
id="blockrandom"
name="iframe"
frameborder="0"
src="<?php echo $this->escape($this->wrapper->url); ?>"
width="<?php echo $this->escape($this->params->get('width')); ?>"
height="<?php echo $this->escape($this->params->get('height')); ?>"
scrolling="<?php echo $this->escape($this->params->get('scrolling')); ?>"
class="wrapper<?php echo $this->pageclass_sfx; ?>">
<?php echo JText::_('COM_WRAPPER_NO_IFRAMES'); ?>
</iframe>
</div>
Here the working code for module (I use as a template override):

Code: Select all

<?php
/**
 * @version		$Id: default.php 20196 2011-01-09 02:40:25Z ian $
 * @package		Joomla.Site
 * @subpackage	mod_wrapper
 * @copyright	Copyright (C) 2005 - 2011 Open Source Matters, Inc. All rights reserved.
 * @license		GNU General Public License version 2 or later; see LICENSE.txt
 */

// no direct access
defined('_JEXEC') or die;
?>
<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 += 20; // scrollbars?
  f.style.height = height + 'px' ;
  f.setAttribute("height", height) ;
}
</script>


<iframe <?php echo $load; ?>
	id="blockrandom"
	frameborder="0"
	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>
Thanks so much,
Matt

OnzeDanny
Joomla! Intern
Joomla! Intern
Posts: 72
Joined: Sun Jan 23, 2011 11:52 am
Location: Belgium - Tongeren

Re: Iframe error on height 100% in IE9 - Solution

Post by OnzeDanny » Wed Aug 31, 2011 5:31 pm

Your welcome :)
Regards, Danny
PiMaG is no longer being developed or supported.

jsiout
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Sat Aug 27, 2011 7:52 am

Re: Iframe error on height 100% in IE9 - Solution

Post by jsiout » Wed Aug 31, 2011 6:38 pm

Thanks Matt and Danny !!!

Now works fine for me !!!

OnzeDanny
Joomla! Intern
Joomla! Intern
Posts: 72
Joined: Sun Jan 23, 2011 11:52 am
Location: Belgium - Tongeren

Re: Iframe error on height 100% in IE9 - Solution

Post by OnzeDanny » Wed Aug 31, 2011 6:44 pm

jsiout wrote:Thanks Matt and Danny !!!

Now works fine for me !!!
I have sent a mail to the developers, maybe they use it for the next release. :geek:
PiMaG is no longer being developed or supported.

jsiout
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Sat Aug 27, 2011 7:52 am

Re: Iframe error on height 100% in IE9 - Solution

Post by jsiout » Thu Sep 01, 2011 2:24 pm

after changes wrapper works fine BUT in iframe pages with small height, i have problem with footer. It appears a space between bottom position and footer

you can see here the results
http://www.hostingservices.gr/index.php ... ame-search

Please HELP me !!!

jsiout
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Sat Aug 27, 2011 7:52 am

Re: Iframe error on height 100% in IE9 - Solution

Post by jsiout » Fri Sep 02, 2011 6:48 pm

??? any news ???

OnzeDanny
Joomla! Intern
Joomla! Intern
Posts: 72
Joined: Sun Jan 23, 2011 11:52 am
Location: Belgium - Tongeren

Re: Iframe error on height 100% in IE9 - Solution

Post by OnzeDanny » Fri Sep 02, 2011 7:01 pm

Try to lower this value:
f.style.height = '100px' ;
This is the MINIMUM height if the wrapper fails.
Set to any value higher than 0
Regards, Danny
PiMaG is no longer being developed or supported.

jsiout
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Sat Aug 27, 2011 7:52 am

Re: Iframe error on height 100% in IE9 - Solution

Post by jsiout » Fri Sep 02, 2011 7:15 pm

OnzeDanny wrote:Try to lower this value:
f.style.height = '100px' ;
This is the MINIMUM height if the wrapper fails.
Set to any value higher than 0
Regards, Danny
Thanks a lot,
FIXED in IE9... but NOT in FF6 :(

Do you have any idea how to fix it in FF6 ?

Thanks !!!

OnzeDanny
Joomla! Intern
Joomla! Intern
Posts: 72
Joined: Sun Jan 23, 2011 11:52 am
Location: Belgium - Tongeren

Re: Iframe error on height 100% in IE9 - Solution

Post by OnzeDanny » Fri Sep 02, 2011 7:20 pm

Not yet, maybe i can check it in the weekend.
Can you provide a URL to your IFRAMED page?
PiMaG is no longer being developed or supported.

jsiout
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Sat Aug 27, 2011 7:52 am

Re: Iframe error on height 100% in IE9 - Solution

Post by jsiout » Fri Sep 02, 2011 7:26 pm


OnzeDanny
Joomla! Intern
Joomla! Intern
Posts: 72
Joined: Sun Jan 23, 2011 11:52 am
Location: Belgium - Tongeren

Re: Iframe error on height 100% in IE9 - Solution

Post by OnzeDanny » Mon Sep 05, 2011 2:08 pm

Hi,
I have tested with FF6 and see no problem ....
Your site haves the same look as i test with other browsers on Linux.
FF6 gives the same result on Linux or Windows ;)
PiMaG is no longer being developed or supported.

jsiout
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Sat Aug 27, 2011 7:52 am

Re: Iframe error on height 100% in IE9 - Solution

Post by jsiout » Mon Sep 05, 2011 2:22 pm

i have ff6.0.1. in win7.

if you see white lane between footer and bottom text this is not good !!!
you can see the difference in this link... http://www.hostingservices.gr/index.php ... er-domains

jsiout
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Sat Aug 27, 2011 7:52 am

Re: Iframe error on height 100% in IE9 - Solution

Post by jsiout » Mon Sep 05, 2011 3:47 pm

did you the differences ?

jsiout
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Sat Aug 27, 2011 7:52 am

Re: Iframe error on height 100% in IE9 - Solution

Post by jsiout » Tue Sep 06, 2011 12:44 pm

any news ???

thanks

francescodelv
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Sun Jun 27, 2010 5:05 pm

Re: Iframe error on height 100% in IE9 - Solution

Post by francescodelv » Tue Sep 06, 2011 3:31 pm

msartor wrote:Hi Danny,

works like a charm for me in FF6 and IE9. Just take care not to confuse code for module and component.

Here the working code for component (I use as a template override):

Code: Select all

<?php
/**
 * @version		$Id: default.php 21391 2011-05-26 17:46:12Z dextercowley $
 * @package		Joomla.Site
 * @subpackage	com_wrapper
 * @copyright	Copyright (C) 2005 - 2011 Open Source Matters, Inc. All rights reserved.
 * @license		GNU General Public License version 2 or later; see LICENSE.txt
 */

// no direct access
defined('_JEXEC') or die;
?>
<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 += 20; // scrollbars?
  f.style.height = height + 'px' ;
  f.setAttribute("height", height) ;
}
</script>

<div class="contentpane<?php echo $this->pageclass_sfx; ?>">
<?php if ($this->params->get('show_page_heading', 1)) : ?>
<h1>
<?php if ($this->escape($this->params->get('page_heading'))) :?>
<?php echo $this->escape($this->params->get('page_heading')); ?>
<?php else : ?>
<?php echo $this->escape($this->params->get('page_title')); ?>
<?php endif; ?>
</h1>
<?php endif; ?>
<iframe <?php echo $this->wrapper->load; ?>
id="blockrandom"
name="iframe"
frameborder="0"
src="<?php echo $this->escape($this->wrapper->url); ?>"
width="<?php echo $this->escape($this->params->get('width')); ?>"
height="<?php echo $this->escape($this->params->get('height')); ?>"
scrolling="<?php echo $this->escape($this->params->get('scrolling')); ?>"
class="wrapper<?php echo $this->pageclass_sfx; ?>">
<?php echo JText::_('COM_WRAPPER_NO_IFRAMES'); ?>
</iframe>
</div>
Here the working code for module (I use as a template override):

Code: Select all

<?php
/**
 * @version		$Id: default.php 20196 2011-01-09 02:40:25Z ian $
 * @package		Joomla.Site
 * @subpackage	mod_wrapper
 * @copyright	Copyright (C) 2005 - 2011 Open Source Matters, Inc. All rights reserved.
 * @license		GNU General Public License version 2 or later; see LICENSE.txt
 */

// no direct access
defined('_JEXEC') or die;
?>
<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 += 20; // scrollbars?
  f.style.height = height + 'px' ;
  f.setAttribute("height", height) ;
}
</script>


<iframe <?php echo $load; ?>
	id="blockrandom"
	frameborder="0"
	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>
Thanks so much,
Matt

there seems that these codes works fine for me(ie9 and ff6 with winxp)... i'm asking to my user to make a test with other pc/browser.... thanks Danny

admWinNT4
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Tue Sep 13, 2011 5:14 pm

Re: Iframe error on height 100% in IE9 - Solution

Post by admWinNT4 » Tue Sep 13, 2011 5:21 pm

It is truly absurd this type of problem, because I realize that developers and users of Joomla, Drupal, Wordpress and other CMS's are completely passive to the errors of Firefox, Mozilla and partner companies $ $. If the wrapper system (joomla) always works in Firefox, IE and other compatible js ask: Why are you trying to solve the problem being that the error is the Browser.

There is a cowardly idiot to say no, because it is security issue. I claim: how many other errors in Firefox and IE the error the problem of wrapper is not security issue for the appointment to other areas in accordance with the rules of ISO was never accepted, the JS not sue. So it was not a security issue, was a matter of changing our hindquarters, and kick as Mozilla does and always accept.

It seems like we do not have the right to be free software?!

Who will pay for more than 185 million websites built in Joomla that will need adjustment mentioned in the file: \ components \ com_wrapper \ views \ wrapper \ tmpl \ default.php

Who will answer for the wrapper that does not respond and contact a sale or fail to happen.

Colleagues need to learn how to claim for it is professionalism. We're not talking about a bug that was fixed, we are talking about something standard, a code that has always worked in JS and logic programming js should continue to work!

Following is the code to fix, but the appeal is: Learn to use these forums environments in Internet browsers and to claim no longer drool-eggs of these firms, no matter what, Linux, Windows, IE, Google, Firefox and other controllers the world. Stop using, or at least use the least show problems. Claim by the manufacturer's website, if it's free.

Followin code tested in:
FF: 4-5-6
IE: 6-7-8-9
Chromo Google


in: \components\com_wrapper\views\wrapper\tmpl\default.php
in: \modules\mod_wrapper\tmpl\default.php


Replace this:

Code: Select all

<script language="javascript" type="text/javascript">
function iFrameHeight() {
	var h = 0;
	if ( !document.all ) {
		h = document.getElementById('blockrandom').contentDocument.height;
		document.getElementById('blockrandom').style.height = h + 60 + 'px';
	} else if( document.all ) {
		h = document.frames('blockrandom').document.body.scrollHeight;
		document.all.blockrandom.style.height = h + 20 + 'px';
	}
}
</script>

For this:

Code: Select all

<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 += 20; // scrollbars?
  f.style.height = height + 'px' ;
  f.setAttribute("height", height) ;
}
</script>

admWinNT4
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Tue Sep 13, 2011 5:14 pm

Re: Iframe error on height 100% in IE9 - Solution

Post by admWinNT4 » Tue Sep 13, 2011 5:23 pm

Now in Portuguese:

É um verdadeiro ABSURDO este tipo de problema, pois percebo que os desenvolvedores e usuários do Joomla, Drupal, Wordpress e outros CMSs são completamente passivos aos erros da FIREFOX, Mozilla e empresas parceiras $$. Se o sistema de wrapper (joomla) sempre funcionou no FIREFOX, IE e demais compatíveis com js pergunto: Porque estão tentando solucionar o problema sendo que o erro é do Browser.

Lá vem um covarde imbecil dizer que não, pois é questão de segurança. Afirmo: como vários outros erros do Firefox e IE o erro o problema do wrapper não é questão de segurança pois o apontamento para outros domínios de acordo com a regras de ISO nunca foi aceito, o JS não processaria. Então não foi questão de segurança, foi questão de mudar e chutar nossos trazeiros como a Mozilla sempre faz e aceitamos.

Fica parecendo que não temos direito pelo software ser gratuito?!

Quem vai pagar pelos mais de 185.000 mil websites construidos em Joomla que necessitarão de ajuste no arquivo citado: \components\com_wrapper\views\wrapper\tmpl\default.php

Quem vai responder pelos wrapper que não responder e uma venda ou um contato deixar de acontecer.

Colegas precisam aprender a reivindicar pois isso é profissionalismo. Não estamos falando de um BUG que foi corrigido, estamos falando de algo padronizado, uma codigo em JS que sempre funcionou e pela lógica da programação js deveria continuar funcionando!

Segue o código para correção, mas fica o apelo: Aprendam a utilizar estes fóruns os ambientes da internet para reclamarem nos Navegadores e deixem de ser baba-ovos destas empresa, não importa qual, Linux, Windows, IE, Google, Firefox e demais controladores do mundo. Deixem de usar, ou pelo menos usem o que menos mostrar problemas. Reclamem pelo site do fabricante, mesmo que seja gratuito.

lexxerd
Joomla! Apprentice
Joomla! Apprentice
Posts: 42
Joined: Wed Oct 20, 2010 11:03 pm

Re: Iframe error on height 100% in IE9 - Solution

Post by lexxerd » Tue Sep 13, 2011 11:42 pm

I had the same issue but with firefox 6+. Tested my site on firefox 4 and didnt have any auto height sizing issues but in firefox 6+ it was broke. I changed the javascript as mentioned here on the third page and it fixed the issue!

Has anyone submitted this to the development team so that it is fixed in later releases?

nosredna000
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Thu Aug 25, 2011 6:38 pm

Re: Iframe error on height 100% in IE9 - Solution

Post by nosredna000 » Wed Nov 16, 2011 2:47 pm

Works for me Joomla 1.5!

rflorat
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Thu Nov 24, 2011 12:55 pm

Solution Iframe error on height 100%

Post by rflorat » Sun Nov 27, 2011 11:59 pm

Joomla 1.7 Solution Iframe error on height 100%, com_wrapper, mod_wrapper

Followin code tested in:
FF: 8.01
IE: 9
Chromo Google 15.0.874.121 m
Opera 11.52

in: \components\com_wrapper\views\wrapper\tmpl\default.php
in: \modules\mod_wrapper\tmpl\default.php

Code: Select all

<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.documentElement.scrollHeight, d.body.scrollHeight) ;

  height += 20; // scrollbars?
  f.style.height = height + 'px' ; 
  f.setAttribute("height", height) ;
   
}
</script>
d.documentElement.scrollHeight (FF, IE, Opera)
d.body.scrollHeight (Chromo Google)


Locked

Return to “General Questions/New to Joomla! 2.5”