开发者

Break out of Iframe

I have a Joomla site, the content is loaded in an iframe from another site. In this iframe I have another iframe (a news ticker), when I click on a link in the news ticker, a page should open in the parent iframe.

When I click on it now, it opens the correct page full screen, and not in the iframe in the joomla site.

(Inception!)

Go check it out: http://www.rtc-antwerpen.be/Site/content/view/14/47/ Click on 'Hybridevoertuigen' in the scroller

开发者_JS百科

Warning: This site is very old, ugly and slow, I just have to upgrade it.

Thanks


Within the a-tag you have to define target="_parent"

<a href="link.php" target="_parent">

This will cause the link to open in the parent frame.

EDIT:

What you seam to be trying to do, is target a div-block outside the IFrame, which is not possible (at least not with some JS running on your main site).

Are the contents you are linking contents, that exist within joomla? Then try to link to their correct URL.

For example, instead of "detail.php?id=435" link to "/Site/content/view/14/435". Then joomla will load the whole site, wrapping the content.


Except for target="_parent" (which should work if your site is structured like you described) or target="_self" (which should work in your site as it actually is structured now), you could also specify the name of a frame in target. That allows you to more specifically point to a target frame, and it is ignored if such a frame does not exist.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜