mr_money — 2010-02-11T19:59:55-05:00 — #1
I have need to communicate between two iframes of the same domain, which live inside a parent page on a different domain that I have no control over.
This is a Facebook app and the basic layout is this
L iframe1 (src='mysite.com/foo')
L iframe2 (src='mysite.com/bar')
I need frame1 to talk to frame2, but in Opera I can't access window.parent.frames['frame2'] to do the usual cross-domain methods (updating location.hash for example)
Is there an alternate way to accomplish this in Opera?
Thanks for your help in advance
paul_wilkins — 2010-02-12T00:54:51-05:00 — #2
mr_money — 2010-02-12T07:34:30-05:00 — #3
That is already the method I am using. The problem with Opera is getting the handle on the iframe window, which I cannot do using "parent.window.frames".
If I were able to get a handle on the frame, I could also use html5 postMessage in Opera.
So, I guess to rephrase my question, is there any alternate way for a child iframe to get a handle on a sibling frame of the same domain if both frames live in a parent page of a different domain (which I do not have control of)
paul_wilkins — 2010-02-12T07:47:33-05:00 — #4
There is no other direct way that I'm aware of. As far as I know the only other alternative is to set up a polling station for the both of them.
mr_money — 2010-02-12T16:40:36-05:00 — #5
Ugh, I was afraid of that.
Thanks for the help.
paul_wilkins — 2010-02-12T16:42:55-05:00 — #6
What you could do though is to use an object detection technique. Do not however perform an explicit check for Opera, because then you will be explicitly denying a solution for any other browser that has a similar problem.
Confirm from scripting whether you can communicate with the other frame. If you can't communicate with it using the standard fashion, only then use polling as a fallback solution.