Microsoft JScript runtime error: 'document.frames[...].document' is null or not an object
<script type="text/javascript"> function getElement(aID) { return (document.getElementById) ? document.getElementById(aID) : document.all[aID]; } function getIFrameDocument(aID) { var rv = null; var frame = getElement(aID); // if contentDocument exists, W3C //compliant(e.g.Mozilla) if (frame.contentDocument) rv = frame.contentDocument; else // bad Internet Explorer ;) rv = document.frames[aID].document; return rv; } function adjustMyFrameHeight() { var frame = getElement("frmLection"); var frameDoc = getIFrameDocument("frmLection"); frame.height = frameDoc.body.offsetHeight; } </script>
<iframe id="frmLection" frameborder="0" width="100%" scrolling="no"> src="Lection1.html" runat="server"> </iframe>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)