开发者

Cross-domain communication with a frame within a frame

开发者 https://www.devze.com 2023-04-04 23:40 出处:网络
I have a page that includes another page on a different domain in an iframe. The page contained in the开发者_如何学运维 iframe is a frameset with another frame.

I have a page that includes another page on a different domain in an iframe. The page contained in the开发者_如何学运维 iframe is a frameset with another frame.

   <!--- page-that-I-control.html --->
   <script src="https://my-web-site.com/recipient.js">
   <iframe id="frame_a" src="https://www.third-party-vendor.com/frameset.html">

   <!--- frameset.html --->
   <frameset>
   <frame id="frame_b" src="https://www2.third-party-vendor.com/innermost-frame.html"> 
   </frameset>

   <!--- innermost-frame.html --->
   <script src="https://my-web-site.com/sender.js">

I'm using postMessage() to get around the same-origin policy, and that works great, but postMessage() isn't supported by IE7.

Is there any way to get around the same origin party and send a message from sender.js to recipient.js that works in IE7?

0

精彩评论

暂无评论...
验证码 换一张
取 消