How to dynamically adjust an iframe’s height?
Posted by Ramani Sandeep on December 16, 2009
Last day when I was using iframe in one of my project , i came across one problem & I have solved it now.
so I think why not to share with you all. I was looking to display content of the other aspx page inside iframe but i wasnt able to adjust the height of the iframe. so try out this solution to resolve it.
Insert iframe on page
What does this code do? When the body of the parent frame loads, it looks up the document element “childframe” which corresponds to the iframe. Then the page calls a function resizeFrame(). The function sets the height of the frame to be the scrollHeight, which effectively removes the scrollbar.
Hope this will help !!!