If I had some thing like this:
<div id="parent">
<iframe....></iframe>
</div>
I could: window.parent.document.getElementById(‘parent’).innerHTML. But I have something like this:
<div>
<iframe....></iframe>
</div>
Is there anyway of accessing this? I might have anywhere up to 20 iframes on a given page, and would prefer not to make 20 individual iframe pages.
Thanks,
Jason
window.frameElementis a reference to the IFRAME element containing the current page. You can usewindow.frameElement.parentNode(inside of the IFRAME) to get the unnamed parent element.Be aware that the property is non-standard.
frameElementseems to be supported in Firefox, Opera, and IE.