Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

behnampmdg3's avatar

Redirect Iframe's parent with window.top.location.href not working

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>
0 likes
2 replies
behnampmdg3's avatar

Sorry bobby;

Please check again.

Open network tab in the inspector and see bc.php

Please or to participate in this conversation.