"Access is denied" error on accessing iframe document object

Posted by Ovesh on Stack Overflow See other posts from Stack Overflow or by Ovesh
Published on 2008-09-30T00:56:00Z Indexed on 2010/05/06 14:28 UTC
Read the original article Hit count: 269

Filed under:
|
|

For posting AJAX forms in a form with many parameters, I am using a solution of creating an iframe, posting the form to it by POST, and then accessing the iframe's content. specifically, I am accessing the content like this:

$("some_iframe_id").get(0).contentWindow.document

I tested it and it worked.

On some of the pages, I started getting an "Access is denied" error. As far as I know, this shouldn't happen if the iframe is served from the same domain.

I'm pretty sure it was working before. Anybody have a clue?

If I'm not being clear enough: I'm posting to the same domain. So this is not a cross-domain request. I am testing on IE only.

P.S. I can't use simple ajax POST queries (don't ask...)

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about AJAX