1

I have a html based application and sometimes my html app needs to open another url in iframe. the problem is that the third party url in the iframe open a new window too with the same content, the same url. so how can i prevent it?

Elad
  • 479
  • 3
  • 11
  • 21

1 Answers1

2

This seems like an iframe breakoutscript in the thirdparty page. A few links about a solution to this problem.

http://stuntsnippets.com/prevent-iframe-breakout/

http://www.zimbio.com/Web+Design/articles/1110/How+prevent+iFrame+breakaway

How to prevent IFRAME from redirecting top-level window

Community
  • 1
  • 1
Stofke
  • 2,928
  • 2
  • 21
  • 28
  • no. those links represents three methods to deal with iframe breakout. 1. the security attribute which disable the javascript inside the iframe - not good 2. using php to remove the iframe breakout code - not good to and 3. using onbeforeunload method which invoke message to user - not good to. I think there is no solution for that except a hack which i can't find on the net too. – Elad Feb 21 '11 at 14:13
  • Why aren't these methods good enough, they deal with iframe breakout which is the problem you are faced with. – Stofke Dec 07 '12 at 21:45