I am trying to automatically resize the iframe to fit the content. Works great in chrome, firefox and opera.
Fails in Internet Explorer. Ideas?
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Leontinas</title>
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript">
var framefenster = document.getElementsByTagName("iFrame");
var auto_resize_timer = window.setInterval("autoresize_frames()", 20);
function autoresize_frames() {
for (var i = 0; i < framefenster.length; ++i) {
if(framefenster[i].contentWindow.document.body){
var framefenster_size = framefenster[i].contentWindow.document.body.offsetHeight;
if(document.all && !window.opera) {
framefenster_size = framefenster[i].contentWindow.document.body.scrollHeight;
}
framefenster[i].style.height = framefenster_size + 'px';
}
}
}
</script>
<link href="cygnacss.css" type="text/css" rel="stylesheet">
</head>
<body style="overflow:scroll">
<iframe allowtransparency="true" frameborder="0" height="0" id="iFrame" name="iFrame" scrolling="no" width="208" src="login.php"></iframe>
</body>
</html>
**
Works great in:
FF, Chrome and Opera - But it doesn't seem to be working in IE 9+.
How can I try and get this fixed and what is causing the problem?**