Given the following HTML, is it possible to bind an anchor tag in an iframe to the parent window?
<div> <iframe src="/pageview.html"></iframe> </div>
iframe (pageview.html):
<a href="http://www.google.com">link</a>
You need the target attribute:
target
<a href="something" target="_parent">go</a>
Using _parent will target the nearest parent frame window. To target the top window, use _top .
_parent
_top
<div> <iframe src="/pageview.html"> <a onclick="javascript:window.parent.location.href='http://www.google.com'; return false;">link</a> </iframe> </div>
There must be something like that ...