Reputation: 4050
I have a javascript that makes a iframe in a blogger and shows a html page that's in a different domain, and there is a button/image in the HTML page. and when someone clicks the button I need to redirect the parent page to another website.
is there a way I can do it?
top.location.href=
is not working.
Upvotes: 0
Views: 771
Reputation: 944442
top.location = ...
You can't access the properties of location
, but you can overwrite the whole thing.
Alternatively, just use a link:
<a href="foo" target="_top">
Upvotes: 1