Permission denied to get property XMLDocument.readyState

柔情痞子 提交于 2019-12-12 04:14:16

问题


I keep getting this error everytime I make an AJAX (iFrame) request to upload a video to viddler.

Permission denied to get property XMLDocument.readyState
ajaxupload35.js (line 455)
[Break on this error] if (doc.readyState && doc.readyState != 'complete'){

Line 455 to 460 is this:

            // fixing Opera 9.26
            if (doc.readyState && doc.readyState != 'complete'){
                // Opera fires load event multiple times
                // Even when the DOM is not ready yet
                // this fix should not affect other browsers
                return;
            }

Full script can be found here.

I keep getting this error although everything works for me. But I would rather solve it - can anyone help?

From another stackoverflow question, I read from Tor Haugen "Does you iframe reference another domain? If it does, you're probably hitting your browser's cross-site scripting defence".

Is the same case for me, if so, how can I fix this?

Thanks


回答1:


You need a server-side proxy to make the cross-domain request for you, and call this proxy with your AJAX, because Javascript cannot access other domains.



来源:https://stackoverflow.com/questions/1084971/permission-denied-to-get-property-xmldocument-readystate

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!