nope..that didnt work, on using your code, both are getting height of about 20% only. If i use two separate functions with almost same coding, i get the 1st iframe of 20% and 2nd one comes as 100% of height.
Code:
<iframe id="content" name="content" src="content.asp" width="80%" frameborder="0" marginheight="0" marginwidth="0"></iframe>
<script type="text/javascript">
function resizeIframe() {
var height = document.documentElement.clientHeight;
height -= document.getElementById('content').offsetTop;
// not sure how to get this dynamically
height -= 20; /* whatever you set your body bottom margin/padding to be */
document.getElementById('content').style.height = height;
};
document.getElementById('content').onload = resizeIframe;
window.onresize = resizeIframe;
</script>
<iframe id="right_page" name="right_page" src="right_page.asp" width="20%" frameborder="0" marginheight="0" marginwidth="0"></iframe>
<script type="text/javascript">
function resizeIframe1() {
var height1 = document.documentElement.clientHeight;
height1 -= document.getElementById('right_page').offsetTop;
// not sure how to get this dynamically
height1 -= 20; /* whatever you set your body bottom margin/padding to be */
document.getElementById('right_page').style.height = height1;
};
document.getElementById('right_page').onload = resizeIframe1;
window.onresize = resizeIframe1;
</script>
somewhere something needs to be changed so that these two functions are treated separately.