“Access is denied” error on accessing iframe document object

后端 未结 7 1310
生来不讨喜
生来不讨喜 2020-12-05 02:35

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

7条回答
  •  余生分开走
    2020-12-05 03:30

    Solved it by myself!

    The problem was, that even though the correct response was being sent (verified with Fiddler), it was being sent with an HTTP 500 error code (instead of 200).

    So it turns out, that if a response is sent with an error code, IE replaces the content of the iframe with an error message loaded from the disk (res://ieframe.dll/http_500.htm), and that causes the cross-domain access denied error.

提交回复
热议问题