Reputation: 52952
I have an iframe that points to a website ie.
<iframe src='http://www.fish.com/' id='fish'>
I have a html on my local pc that tries to click a button in the iframe:
alert ( $('#fish').contents().find('#myButton').length );
I have enabled cross site scripting in my browser and lowered security to the max. I still get access denied errors. I have tried in IE6, IE8, and Firefox. How can I remove this restriction? I am trying to test something, and understand the risks etc.
Here is an example:
Using the exact code above.
Upvotes: 2
Views: 1720
Reputation: 236092
Firefox needs the option signed.applets.codebase_principal_support
set to true
(about:config).
Chrome needs to get started with --disable-web-security
IE needs the option allow cross-domain access (...)
under Extras -> Security
Those options will disable the security check for cross-domain access on XHR objects and iframes.
Upvotes: 2