source: http://stackoverflow.com/questions/729577/can-javascript-access-iframe-elements-from-the-parent-page
Answer:
Answer:
It should not be able to if the pages are from different domains, the browsers security sandbox should prevent this type of access. It might work when the two pages are from different sub domains of the same domain, but that can and will differ between browsers (and possibly even versions of the same browser).
Accessing the child iframe might work, but the other way around will most certainly not work.
Reply:
i am talking about access the child iframe elements, it should work? – Amr ElGarhy Apr 8 '09 at 11:37
only "might work" you'd have to tell us the domains to know – annakata Apr 8 '09 at 11:39
these are sites i am creating, and want them all to call one service. – Amr ElGarhy Apr 8 '09 at 12:28
You may be better off using an XMLHttpRequest object to call your service. All frames will then be able to access the service for themselves and they won't need any communication between them. – Gerco Dries Apr 8 '09 at 15:10
Example:
Example:
댓글
댓글 쓰기