Josh
Josh

Reputation: 111

iframe force links to open in the current window

I'm looking for a solution that allows any links that are clicked inside an iframe to open in the window containing the iframe.

people have suggested using:

<base target="_parent" />

However, i don't have access to the source of the iframe

Please could you help me achieve a solution or point me in the right direction, any help is greatly appreciated.

Thank you in advance, Josh

Upvotes: 0

Views: 93

Answers (1)

Michael Schwartz
Michael Schwartz

Reputation: 8425

What you're asking for is not possible because of the the Same Origin Policy :(

If you did have access to the source you could use contents() to manipulate the contents of the iframe.

Upvotes: 1

Related Questions