Ver Mensaje Individual
  #4 (permalink)  
Antiguo 17/01/2007, 10:12
STRAW102
 
Fecha de Ingreso: diciembre-2006
Mensajes: 16
Antigüedad: 17 años, 4 meses
Puntos: 0
Re: iframe autoajustable

Cita:
Iniciado por DragonX Ver Mensaje
mira hace rato, creo que PGB , habia preguntado algo parecido en el foro de CSS, segui el hilo un tiempo y creo que no encontraron solución para esto, pero no estoy seguro.

Date una vuelta por ahi y fijate, o busca la palabra iframe ajustable en el buscador del foro.
Gracias he encontrado por ahi este codigo y si FUNCIONA!!
---------------------------------------------------------------------

The Code
In the head of your document enter the following JavaScript code:

<script language="JavaScript">
<!--
function calcHeight()
{
//find the height of the internal page
var the_height=
document.getElementById('the_iframe').contentWindo w.
document.body.scrollHeight;

//change the height of the iframe
document.getElementById('the_iframe').height=
the_height;
}
//-->
</script>

and in the body create the iframe tag:
<iframe width="700" id="the_iframe"
onLoad="calcHeight();"
src="testing_page.shtml"
scrolling="NO"
frameborder="1"
height="1">
An iframe capable browser is
required to view this web site.
</iframe>


--------------------------------------------------------------
sencillo no?...