Target=”_blank” links inside iframe

iframe

I load a page from another domain with iFrame which has target="_blank" links. When I click, the url is opened in a new page as usual. How can I avoid those links to be opened in new windows? I want those links to be opened inside the iframe.

Best Answer

The only real solution would be to change target="_blank" to target="_self". Or remove the target attribute completely and let the default action occur (which is _self).

This question might be a re-post of this: Force any HREF in an IFrame to use its parent as the target, but some of those techniques might be useful to you.

But if the page is on a domain you have no control over, you can't really do anything.