sexta-feira, abril 03, 2009

redimencionar iframe html

testei esse codigo no ubuntu com o firefox 3.0.8 e nao tive nenhum problema.


<script type="text/javascript">
function autoIframe(frame){
try{
innerDoc = (frame.contentDocument) ? frame.contentDocument : frame.contentWindow.document;
frame.height = innerDoc.body.scrollHeight + 50;
}catch(err){
alert(err);
window.status = err.message;
}
}
</script>


<iframe name="detailFrame"
src ="foo.html"
scrolling="no"
frameborder="0"
onload="if (window.parent && window.parent.autoIframe) {window.parent.autoIframe(this);}">