Quantcast
Channel: Resizing an iframe based on content - Stack Overflow
Browsing all 28 articles
Browse latest View live

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 Article


Answer 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 Article


Answer 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 Article

Answer 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 Article

Answer 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 Article


Answer 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 Article

Resizing 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 Article

Answer 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

Browsing all 28 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>