Ver Mensaje Individual
  #1 (permalink)  
Antiguo 12/04/2010, 09:11
Avatar de aniMAYtions
aniMAYtions
 
Fecha de Ingreso: diciembre-2007
Ubicación: Granada
Mensajes: 519
Antigüedad: 16 años, 4 meses
Puntos: 2
reconocer iframe

Hola compañer@s.

Resulta que tengo un iframe en mi plantilla joomla que no se redimensiona.

He colocado el post aquí porque creo que el iframe debería pertenecer al módulo wrapper, pero por más que cambio los atributos del iframe, no cambia en absoluto.

A ver, el código que me encuentro en el default.php del tmp del módulo wrapper es el siguiente

Código:
<?php // no direct access
defined('_JEXEC') or die('Restricted access'); ?>
<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>

<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 ?>"
	align="top"
	frameborder="0"
	class="wrapper<?php echo $class ?>">
	<?php echo JText::_('NO_IFRAMES'); ?>
</iframe>
Y el que veo cuando le digo a firefox que me muestre el código fuente, en referencia a esta parte es
Código:
<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>
<div class="contentpane">
	<div class="componentheading">
	Ficha del Usuario	</div>
<iframe onload="iFrameHeight()"	id="blockrandom"
	name="iframe"
	src="http://mipagina_wrapper.php"
	width="100%"
	height="500"
	scrolling="no"
	align="top"
	frameborder="0"
	class="wrapper">
	Esta opción no funcionará correctamente. Lamentablemente su navegador no tiene soporte para Inline Frames</iframe>
</div>
Por esto mismo he supuesto que el iframe pertenece al código del módulo wrapper, aparte de porque el iframe que no me redimensiona corresponde al de una página wrapper.

Pero cuando le cambio cosas como el border=1 o el scrolling=yes no hace absolutamente nada, y eso me hace pensar que me estoy equivocando de iframe.

Alguien podría guiarme??
Mil gracias