Is there a way to have content from an IFRAME overflow onto the parent frame?

This may be off the mark either because it's unsuitable in light of your requirements, or it may not actually help (!), but it might be worth checking out UFrame. It's a kind of hybrid of iframe and div, and could probably be packaged up as a widget (your best bet would be to give clients a <script> tag which would suck in UFrame and the relevant markup). What I'm not sure about is whether you can achieve the overlay you require, but it's possibly worth a play around with. Sorry I can't be more specific but it's not something I've actually used myself, I just bookmarked it a while back for future reference.


I couldn't find a way to make the content of the frame flow out of the frame, but I did find a way to hack around it, by moving the tooltip into the parent document and placing it above (z-index) the iframe.

The approach was:
1) find the iframe in the parent document
2) remove the tooltip element from where it is in the DOM, and add it to the parent document inside the element that contains your iframe.
3) you probably need to adjust the z-index and positioning, depending on how you were doing that in the first place.

You can access the parent document of an iframe using parent.document.

jQuery(tooltip).remove();
var iframeParent = jQuery("#the_id_of_the_iframe", parent.document)[0].parentNode;
iframeParent.appendChild(tooltip);
//adjust z-index, positioning

No it's not possible. Ignoring any historical reasons, nowadays it would be considered a security vulnerability -- eg. many sites put untrusted content into iframes (the iframe source being a different origin so cannot modify the parent frame, per the same origin policy).

If such untrusted content had a mechanism to place content outside of the bounds of the iframe it could (for example) place an "identical" login div (or whatever) over a parent frame's real login fields, and could thus steal username/password information. Which would suck.


if you know the absolute top of value that tool top can have you can create a div that is the height of the content + the highest distance the tool tip will display in. Align the iframe to the bottom of the div. make sure the iframe and div are transparent. then the iframe content with the tool tip should display. Though this is setting your self up for the headache of making sure stuff like highlighting work the same in all browsers.