It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming JavaScript Forum

Dynamically setting the height of Iframe

Dynamically setting the height of Iframe

Postby Adams on Thu Oct 13, 2011 4:41 am

Hi all,

I have a iframe .The source page of the iframe depends on the selection in the dropdown.I want to set the height dynamically so that no scroll bar appeares.I am using the following code.

iframe.style.height = iframe.contentWindow.document.body.scrollHeight + 'px';

Calling this in the dropdown's onselectedIndexchanged event.The problem is Whenever I load a bigger page there willnot be any scroll bar.But if load smaller page after bigger page,the bigger page's scroll height is set to the smaller page,s scrollheight.Please help me out in this regard.



Thanks in Advance
Adams
 
Posts: 1
Joined: Thu Oct 13, 2011 4:27 am

Who is online

Users browsing this forum: No registered users and 6 guests