I have a window containing an iframe containing an iframe, for example:
+---------------+
| Top |
| +-----------+ |
| | Middle | |
| | +-------+ | |
| | | Inner | | |
| | +-------+ | |
| +-----------+ |
+---------------+
Top and Middle are in the same domain, but Inner is in the other domain. I need Inner to chat with Top. The only way I know to do this, which is supported in IE7 (which I need to support), is to change the hash of the window layout. However, I do not want the information to appear in the location bar, so I introduced an average iframe.
I want Inner to change the middle hash. The average will read the hash and tell Top with whom it has permission to speak directly.
However , in Firefox 3, I was unable to write a middle hash from Inner. An error does not occur, but the hash does not change. Writing to it location.hrefcauses a permission error.
Top , Middle , Top , Inner Middle , , , , ! ( .)
. . Inner , . Middle , .
Inner ?
. , - . , . - ( ) - . , . HTML 5 postMessage().
: http://softwareas.com/cross-domain-communication-with-iframes