views:

45

answers:

2

I have a site on my server that is pulling in an iframe from an external site in which I do not have access.

I want the iframe to resize the height based on the content that is being pulled in so the page as a whole looks like a single page.

*I do not need to know how to get rid of the scroll bars.

Does anyone have any ideas? Thanks in advance!

A: 

I don't think it's possible. There is no way to interact with an iframe with JavaScript. That would have serious security consequences so browsers don't allow it.

SimpleCoder
This is correct. Cross-domain issues prevent the browser from being able to detect the content of a non-local iframe.
mattbasta
Yep, and the whole reason why the browser prevents access to iframes is to prevent against XSS and XSR attacks
SimpleCoder
A: 

in css try

#frame_ID{
  height:auto;
}

I tried a whole bunch of things in css to see if there was any way to tell when the iframe didn't have a scrollbar and I found no solution so. Like the comment says this will not work.

qw3n
No, will not work.
mattbasta
@mattbasta +1 for correcting me and making me think :D.
qw3n