Introduction:
In this article,i am going to explain how to adjusting iframe size based on screen resolution or its contents,
Main:
<html>
<body OnLoad = "AdjustSize();">
<div id="FrameDiv" Height="440px">
<iframe id="Frame" src="WebForm1.html">
</iframe>
</div>
</body>
</html>
function AdjustSize()
{
if ((screen.width>=1024) && (Screen.height>=768)){
document.getElementById('Frame').style.height =
Frame.document.body.scrollHeight + 10;
}
}
<html> <body OnLoad = "AdjustSize();"> <div id="FrameDiv" Height="440px"> <iframe id="Frame" src="WebForm1.html"> </iframe> </div> </body> </html> function AdjustSize() { if ((screen.width>=1024) && (Screen.height>=768)){ document.getElementById('Frame').style.height = Frame.document.body.scrollHeight + 10; } } |
Conclusion:
Hope this helps,
Happy Coding.
Please, can you PM me and tell me few more detailles about this, I am really fan of your web log…
I would like to exchange links with your site netprogramminghelp.com
Is this possible?