resize iframe internet explorer 9

Trying to create a function that re-sizes iframes at \[code\]window.onload\[/code\].The following works with Fire Fox but not IE 9. After searching I tried a few of the other examples but they mess up the Fire Fox re-size and don't fix the IE 9 re-size.Any suggestions?\[code\]<script type="text/javascript" language="javascript"> function sizeFrame() { var frames = document.getElementsByTagName('iframe'); for (var i = 0; i < frames.length; i++){ var fID = frames.id; var F = document.getElementById(fID); if(F.contentDocument && F.contentDocument.documentElement.scrollHeight) { F.height = F.contentDocument.documentElement.scrollHeight+30; //FF 3.0.11, Opera 9.63, and Chrome } else if(F.contentDocument && F.contentDocument.documentElement.offsetHeight) { F.height = F.contentDocument.documentElement.offsetHeight+30; //standards compliant syntax
 
Back
Top