Monday, June 3, 2024
 Popular · Latest · Hot · Upcoming
53
rated 0 times [  56] [ 3]  / answers: 1 / hits: 36608  / 16 Years ago, wed, april 8, 2009, 12:00:00

I have iframe on a page, the iframe and the parent page are in different domain, can a javascript code on the parent page access elements inside this iframe?


More From » jquery

 Answers
82

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.


[#99730] Thursday, April 2, 2009, 16 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
jacquezf

Total Points: 27
Total Questions: 109
Total Answers: 98

Location: Lesotho
Member since Wed, Jun 2, 2021
3 Years ago
;