Les explico tengo un HTML en el cual hay un "iframe" en el cual me cargan las diferentes páginas (generalmente php) a través de unos botones, he probado diferentes códigos pero solo 2 an estado cerca pero aun no ocurre lo que quiero...
Código Nº 1:
Pagina Padre
Código HTML:
<script type="text/javascript"> function ini() { document.getElementById("contenido").height = window.frames.contenido.document.body.offsetHeight + window.frames.contenido.document.body.scrollHeight; } </script>
Código HTML:
<iframe name='contenido' width='764' marginwidth='0' marginheight='0' frameborder='0' id="contenido" scrolling="No" onload="ini()"></iframe>
Con el 2º código que utilizó es este, y lo encontre aquí:
Código Nº 2:
Página Padre
Código HTML:
<script type="text/javascript"> // <![CDATA[ function recalcula(){ var daH = (document.body && document.body.clientHeight)?parent.interior.document.body.clientHeight: 0; daH = (document.addBinding)?daH+20:daH+5; //alert(daH); document.getElementById("elIframe").style.height = daH + "px"; } function cargar(url){ parent.interior.location.href=url; } // ]]> </script> <style type="text/css"> <!-- iframe { width : 764px; overflow : hidden; } --> </style>
Código HTML:
<iframe name='interior' marginwidth='0' marginheight='0' frameborder='0' id="elIframe" scrolling="NO" onload="recalcula()"></iframe>
solo pongo este estilo:
Código HTML:
<style type="text/css"> <!-- html, body { padding : 0; margin : 0; width : 764px; } --> </style>
Alguna ayuda u orientación, plisssss!!!!
![Neurótico](http://static.forosdelweb.com/fdwtheme/images/smilies/scared.png)
![Neurótico](http://static.forosdelweb.com/fdwtheme/images/smilies/scared.png)
![Neurótico](http://static.forosdelweb.com/fdwtheme/images/smilies/scared.png)
![Neurótico](http://static.forosdelweb.com/fdwtheme/images/smilies/scared.png)
Gracias!!!!