Answer by Ahmy for Resizing an iframe based on content
If you do not need to handle iframe content from a different domain, try this code, it will solve the problem completely and it's simple:<script language="JavaScript"><!--function...
View ArticleAnswer by ConroyP for Resizing an iframe based on content
We had this type of problem, but slightly in reverse to your situation - we were providing the iframed content to sites on other domains, so the same origin policy was also an issue. After many hours...
View ArticleAnswer by Joeri Sebrechts for Resizing an iframe based on content
iGoogle gadgets have to actively implement resizing, so my guess is in a cross-domain model you can't do this without the remote content taking part in some way. If your content can send a message with...
View ArticleAnswer by Macho Matt for Resizing an iframe based on content
The solution on http://www.phinesolutions.com/use-jquery-to-adjust-the-iframe-height.html works great (uses jQuery):<script type=”text/javascript”> $(document).ready(function() { var theFrame =...
View ArticleAnswer by Ólafur Waage for Resizing an iframe based on content
Something on the lines of this i belive should work.parent.document.getElementById(iFrameID).style.height=framedPage.scrollHeight;Load this with your body onload on the iframe content.
View ArticleAnswer by roryf for Resizing an iframe based on content
This is slightly tricky as you have to know when the iframe page has loaded, which is difficuly when you're not in control of its content. Its possible to add an onload handler to the iframe, but I've...
View ArticleResizing an iframe based on content
I am working on an iGoogle-like application. Content from other applications (on other domains) is shown using iframes. How do I resize the iframes to fit the height of the iframes' content?I've tried...
View ArticleAnswer by David Bradshaw for Resizing an iframe based on content
Answer in 2024It has been 15 years since this question was first asked and browsers still struggle with this issue. Modern browsers have come along way since then, but still don't have a simple...
View Article