Tema: iframe 100%
Ver Mensaje Individual
  #1 (permalink)  
Antiguo 12/10/2011, 14:54
atagp
 
Fecha de Ingreso: octubre-2011
Mensajes: 1
Antigüedad: 13 años, 6 meses
Puntos: 0
iframe 100%

Uso este script para redimensionar un iframe. Me funciona OK excepto en IE 8, que no chuta. No hace absolutamente nada.

¿Alguien puede ayudarme? Llevo cuatro días peleando.

Código:
                <script type="text/javascript">
function resizeIframe() {
    var height = document.documentElement.clientHeight;
    height -= document.getElementById('marco').offsetTop;
    
    // not sure how to get this dynamically
    height -= -700; /* whatever you set your body bottom margin/padding to be */
    
    document.getElementById('marco').style.height = height +"px";
    
};
document.getElementById('marco').onload = resizeIframe;
window.onresize = resizeIframe;
    </script>
Aquí inserto el iframe. Tengo que poner Id y Name porque IE no reconoce la etiqueta ID en los target de los enlaces que apuntan al inframe.

<iframe id="marco" name="marco" src="cat_b_dirigido.htm" scrolling="No" width="100%" height="500px" frameborder="0"> If you can see this, your browser doesn't
understand IFRAME. However, we'll still <a href="cat_b_dirigido.htm">link</a> you to the file. </iframe>
</p>