So I have a .jsp page that has an iframe in it. The content of this iframe is hosted on a separate domain. On a mobile device, I'm looking for this iframe to detect an orientation change and alter the dimensions of the content accordingly.
Is there a way to add an event listener to the content stored within this iframe that would detect an orientation change?
If this content were not within an iframe, and accessed directly instead, a call like: window.addEventListener('orientationchange', FunctionToBeCalled, false); successfully catches an orientation change and calls the appropriate function. However, I can't seem to get this to work from within the iframe. I've tried parent.addEventListener, parent.window.addEventListener, top.addEventListener, etc. but to no avail.
From what I've read it sounds like since this is a cross-domain call I have very limited parent functionality available to me, am I doomed to fail?
Any help would be greatly appreciated. Thanks!