Hey Guys!
I have fairly good skills in Javascript but there is one thing I just can't seem to crack. My problem is such...
I have two iFrames aligned beside each other. Both with dynamic content. However, there is one iFrame that is the one that gets most updated (height-wise) and that is the left iFrame.
I have tried to adjust the right iFrame to have the exact height that the left iFrame has when the left one gets it's content updated, but with no luck what so ever.
How can i resize the right iFrame to the same height as the left one gets when it's updated with new content and at?
Sooo... What I mean is: How can I make the right iFrame inherit the left iFrames height when the left iFrame is updated?
I am using this script to resize the iFrames when new content is loaded into them:
Let's call the iFrames:
Left One: "m1"
Right One: "m2"
<script language="JavaScript">
<!--
function autoResize(id){
var newheight;
var newwidth;
if(document.getElementById){
newheight=document.getElementById(id).contentWindow.document .body.scrollHeight;
newwidth=document.getElementById(id).contentWindow.document .body.scrollWidth;
}
document.getElementById(id).height= (newheight) + "px";
document.getElementById(id).width= (newwidth) + "px";
}
//-->
</script>
I am in a serious deadline trouble and would be so greatful for any quick and reliable solutions for this problem.
Thank you guys!
Regards,
Richard
I have fairly good skills in Javascript but there is one thing I just can't seem to crack. My problem is such...
I have two iFrames aligned beside each other. Both with dynamic content. However, there is one iFrame that is the one that gets most updated (height-wise) and that is the left iFrame.
I have tried to adjust the right iFrame to have the exact height that the left iFrame has when the left one gets it's content updated, but with no luck what so ever.
How can i resize the right iFrame to the same height as the left one gets when it's updated with new content and at?
Sooo... What I mean is: How can I make the right iFrame inherit the left iFrames height when the left iFrame is updated?
I am using this script to resize the iFrames when new content is loaded into them:
Let's call the iFrames:
Left One: "m1"
Right One: "m2"
<script language="JavaScript">
<!--
function autoResize(id){
var newheight;
var newwidth;
if(document.getElementById){
newheight=document.getElementById(id).contentWindow.document .body.scrollHeight;
newwidth=document.getElementById(id).contentWindow.document .body.scrollWidth;
}
document.getElementById(id).height= (newheight) + "px";
document.getElementById(id).width= (newwidth) + "px";
}
//-->
</script>
I am in a serious deadline trouble and would be so greatful for any quick and reliable solutions for this problem.
Thank you guys!
Regards,
Richard