Reputation: 13
I'm aware that this question has been asked a number of time on SO and have looked over many of the posts but none seem to be as restrictive. I may not be able to do anything about this but I want to ask.
I need the content within an iframe to grow and shrink with the content. The main problem that I see is that javascript cannot be used because the site providing the framed content will only provide an iframe tag with a link to its content. There is of course no guarantee that the site where the iframe is placed will allow javascript so I don't see that as an option.
Is there another alternative to an iframe that will allow me to import dynamically growing and shrinking content that doesn't rely on javascript?
Upvotes: 1
Views: 1568
Reputation: 21184
You can use PHP on the server-side to retrieve the content and then include it within the page. You can strip out the meta-data, and adjust the CSS and HTML with Xpath if you need to.
If it's a completely different bit of content for which adjusting the CSS and HTML won't work, then an iframe does remain about the only solution. If you have access to a server with a GUI, you could load the page and store the height in a database, and then set the height of the iframe on load.
Upvotes: 1
Reputation: 65166
I'd say that with current technology and browsers, this just cannot be done. Not without JavaScript.
And it's not pretty even with JavaScript.
Upvotes: 0
Reputation: 5052
Try this:
http://kinsey.no/blog/index.php/2010/02/19/resizing-iframes-using-easyxdm/
I believe it still works.
Upvotes: 0