1

How can I force an IFrame to open links inside the parent?

The only way I could find here on StackOverflow and over the net is to use the target attribute inside the links themselves or inside the base tag.

The problem starts when the source of the IFrame is external. For example, if I want to embbed Google inside the IFrame, I cannot alter the code of Google, so I need a way to tell the IFrame itself to open links in the parent, without touching the code of the source.

Thanks.

Sipo
  • 2,826
  • 4
  • 26
  • 61
  • I think you can not do that because of Same-origin security policy. read this for more information: https://stackoverflow.com/questions/25098021/securityerror-blocked-a-frame-with-origin-from-accessing-a-cross-origin-frame – ICE Mar 28 '18 at 10:13

0 Answers0