페이지에 다음과 같은 자동 높이 스크립트가있는 iframe이 있습니다. 외부 페이지가로드 될 때IE에서 페이지가 변경 될 때 iframe 자동 높이가 작동하지 않습니다.
function autoHeight(e)
{
if (e.contentDocument) {
e.height = e.contentDocument.body.offsetHeight + 35;
}
else {
e.height = e.contentWindow.document.body.scrollHeight + 35;
}
}
document.domain = "example.co.uk";
var ifr = document.getElementById('housingdata');
ifr.onload = function() {
autoHeight(ifr);
}
iframe을 잘 크기를 조정합니다,하지만 난 iframe에 새로운 페이지로 이동하는 경우, 스크롤바가 나타나고 페이지가 Internet Explorer에서 크기가 조정되지 않습니다. onload 이벤트가 발생할 때마다 다른 브라우저에서 iframe 크기가 조정됩니다.
IE8을 사용하고 있지만 외부 페이지가 IE7 호환 모드로 설정되어 있습니다. IE에 대한 해결 방법이 있습니까?