When someone clicks a link in an iframe, navigate around the window

This seems like a general question, which implies that maybe I am missing something obvious.

I have a small application that displays a different page (from another domain) inside an iframe with my title at the top. So far, so good. But when someone clicks the link on this inner page, he simply moves the iframe - I want him to move across the page (including, in particular, updating the URL in the URL bar).

This is basically the opposite of clickjacking. I just want the navigation to work as if it is not an iframe. Is there an easy way?

+5
source share
3 answers

<iframe> , - .
html-, - :

href="javascript:parent.window.location.href='http:/google.com'
+4

iframe : _parent _top.

<a href='#aboutus' target='_parent'>About Us</a>
+3

, , iframe.

, iframe. (), , , , , , , . !

If this is your site inside the frame, it is possible through the transfer of state through the server or using the new (ish) HTML5 Web Messaging in a standard way or by managing parent.windowfrom within the frame.

+1
source

All Articles