Redirect parent window from an iframe action
Solution 1:
window.top.location.href = "http://www.example.com";
Will redirect the top most parent Iframe.
window.parent.location.href = "http://www.example.com";
Will redirect the parent iframe.
Solution 2:
I found that <a href="..." target="_top">link</a>
works too
Solution 3:
window.top.location.href = "http://example.com";
window.top
refers to the window object of the page at the top of the frames hierarchy.
Solution 4:
target="_parent"
worked great for me. easy and hassle free!
Solution 5:
or an alternative is the following (using document object)
parent.document.location.href = "http://example.com";