Asked by Ali
window.top.location.href = "http://www.example.com";
The top-most parent Iframe will be redirected.
window.parent.location.href = "http://www.example.com";
The parent iframe will be redirected.
Answered by MIP
I discovered that a href=”…” target=” top”>link/a> works well as well.
Answered by Ali
window.top.location.href = "http://example.com";
The window object of the page at the top of the frames hierarchy is referred to as window.top.
Answered by Luca Matteis
For me, target=” parent” worked perfectly. Simple and hassle-free!
Answered by rDroid
Alternatively, consider the following: (using document object)
parent.document.location.href = "http://example.com";
Answered by Real Red.
Post is based on https://stackoverflow.com/questions/580669/redirect-parent-window-from-an-iframe-action