Cross-Domain iframe communication
Posted
by Chris
on Stack Overflow
See other posts from Stack Overflow
or by Chris
Published on 2009-12-22T22:59:47Z
Indexed on
2010/03/22
14:01 UTC
Read the original article
Hit count: 336
iframe
|cross-domain
I have an iframe being created on a page, and the page's domain is being explicitly set to 'xyz.com' but the iframe's domain is defaulting to 'dev.xyz.com', which is the actual domain i'm developing for.
The problem is, when I try to access that iframe via iframe.contentWindow.document, it fails due to the difference in domain.
I've tried setting the iframe's src to a file with document.domain = 'xyz.com' but that doesn't seem to be doing the trick...
Any ideas?
© Stack Overflow or respective owner