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
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)
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.
Ugh, I was afraid of that.
Thanks for the help.
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.