Link to home
Start Free TrialLog in
Avatar of shwekhaw
shwekhaw

asked on

Resize iframe height dynamically

My website currently uses two iframes in the left menu navigation bar. Their heights are too large so I cannot fit anything else there but those two. I want them started out collapsed at a defined height (~ 250 px) when the page is loaded. Then I want to give user option to expand (by clicking on + sign). When + sign is clicked, iframe should expand. Then, + sign should change to - sign and use can click on it to collapse back to previous height. I have looked all the previous questions but did not find exact solution I need. Could you help? Suggested solution should work in IE, Netscape and Firefox browsers.

ASKER CERTIFIED SOLUTION
Avatar of bluV11t
bluV11t
Flag of Norway image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of shwekhaw
shwekhaw

ASKER

It is great. Just one thing. I tried to put the plus and minus sign image below iframe tage so they would appear at the bottom corner of the table box. Like this
<iframe id="secondframe" height=250 width=200></iframe>
<IMG src="plus.gif" id="expButton2" name="small" onclick="fnToggle('secondframe', 'expButton2');"><br />
 
 However, image does not appear. I think image is hidden behind the iframe. Is it possible to position image in such location?
Shouldn't be a problem but if the tables are styled with somthing like overflow:hidden that could easily hide the gif.  
I just placed image inside separate <tr> tag. Thanks for the solution.