Reputation: 21651
I've an iFrame A which has an iFrame B inside it. In frame B i load a page which has a input type button element. It basically, when gets clicked, navigates to another page. Now i want to change the target of the button so that i loads the page in its parent iFrame A.
I've tried changing
currentButton.target = '_parent'
But it is not working. Any ideas?
Upvotes: 0
Views: 120
Reputation: 178285
Upvotes: 1
Reputation: 324627
The following will do it:
parent.location.href = "your url here";
Upvotes: 0