When trying to retrieve a dynamic height iframe, I implement the code below.
In the <head>
area
<script language="javascript" type="text/javascript">
function adjustIframe(obj) {
obj.style.height = obj.contentWindow.document.body.scrollHeight + 'px';
}
</script>
Within the <body>
<iframe name="somepage" src="somepage.html" width="100%" frameborder="0" scrolling="no" onload='javascript:adjustIframe(this);' /></iframe>
While this code works flawlessly on my domain account and is compatible with all browsers, it fails to function when tested on another domain account. The files were transferred (copied & pasted), ensuring they are identical. Troubleshooting suggestions are welcome!