How do we access parent document from a document loaded inside an iframe when the page loaded inside iframe is from another domain?
I am getting a permission denied error.
How do we access parent document from a document loaded inside an iframe when the page loaded inside iframe is from another domain?
I am getting a permission denied error.
if you have control of both documents, then you could easily use easyXDM (http://easyxdm.net) to communicate between them. A nice and easy example of using it can be found at http://consumer.easyxdm.net/current/example/methods.html
This rather old blog post seems to be addressing this issue: http://jszen.blogspot.com/2005/03/cross-domain-security-woes.html
http://radio.javaranch.com/pascarello/2005/12/30/1135962460818.html highlights some of the risk if cross-domain javascript was allowed.
So the permission denied error is correct.