Link to home
Start Free TrialLog in
Avatar of itcdr
itcdrFlag for United States of America

asked on

overflow:visible not working with iframe

How do I make it so when the iframe changes the data is still visible without a scrollbar. A div tag does this automatically, but I can't get an iframe to do it. Any ideas?

<iframe scrolling="no" src="http://www.other_domain.com/" style="overflow:visible"></iframe>
Avatar of VirusMinus
VirusMinus
Flag of Australia image

based on w3 specs the height of an iframe cannot be resized.

you can do it using javascript and DOM only for pages inside your own domain.

ref: http://www.dynamicdrive.com/dynamicindex17/iframessi2.htm
Avatar of itcdr

ASKER

They will be on different domains. Google created a search box you can put on your site that can resize. How did they do it?

http://code.google.com/apis/ajaxsearch/
Avatar of klykken
klykken

<iframe style="width: 200px; height: 200px;"></iframe>

-klykken
Avatar of itcdr

ASKER

That doesn't work. All that does is set the iframe to 200px by 200px. What if when the content changes and it needs 300px. I'll get a scrollbar or the content will be hidden.

I checked out google's api and it looks like they accomplish this by using the script tag to call dynamic server pages. They don't use iframes or AJAX. So then is there no way to have the iframe visible on overflow like a div tag when they are not on the same domain?
ASKER CERTIFIED SOLUTION
Avatar of VirusMinus
VirusMinus
Flag of Australia 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