Question

Possible Duplicate:
Permission Denied IE iFrame

I have an iframe in b.com which attempts to grab the jQuery library from a.com [my website]. Whenever it does this I get the "Access is Denied" error in both IE7 and IE8.

I have checked out Fiddler and it doesnt show that the script is getting blocked - but IE does errors with "Access is Denied"

What is causing this prob and how to get around it ?

Thx

Was it helpful?

Solution

Put simply, browser security won't let you communicate between two frames that are on different domains. So you can't "grab the jQuery library" from another frame. There's no work around or it would be a security hole in the browser.

Your only options are to do one of the following:

  • Not communicate between the frames (eg. load jQuery in all frames that need it)
  • Host the content of each frame on the same domain (you can work with different subdomains)

OTHER TIPS

some situations IE7 takes different domains/Virtual Folders from href address... www.foo.com and foo.com are different domains etc. Do you have a linkage like that?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top