Level 88
Did you check this out? https://stackoverflow.com/questions/580669/redirect-parent-window-from-an-iframe-action
There are multiple solutions in there ;)
Also, I don't see the redirect part in your examples...
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi;
How come redirect iframe parent doesn't work?
window.top.location.href
Direct link: http://pum.wdsmembers.com/bc.html
Fiddle: https://jsfiddle.net/kv51uf7p/
Redirect code is generated in https://timerz.xyz/timer/bc.php
Thanks
Here's the code
<script>alert('Js runs fine, next it should redirect iFrame\'s parent');</script>
<script>window.location.replace("http://webmoosh.com/broadcast-end.html");</script>
<script>window.top.location.href = "http://webmoosh.com/broadcast-end.html";</script>
Please or to participate in this conversation.