拒绝获取属性XMLDocument.readyState的权限 [英] Permission denied to get property XMLDocument.readyState

查看:103
本文介绍了拒绝获取属性XMLDocument.readyState的权限的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每次发出AJAX(iFrame)请求将视频上传到viddler时,我都会不断收到此错误.

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

第455行到460行是这样的:

            // 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;
            }

可以在此处找到完整脚本.

尽管一切都对我有用,但我一直收到此错误.但是我宁愿解决它-有人可以帮忙吗?

另一个stackoverflow问题,我从Tor Haugen读到您是否iframe引用了另一个域?如果是,则可能是浏览器的跨站点脚本防御."

我的情况是否相同,如果这样,我该如何解决?

谢谢

解决方案

您需要一个服务器端代理来为您发出跨域请求,并使用AJAX调用此代理,因为Javascript无法访问其他域. /p>

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

解决方案

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.

这篇关于拒绝获取属性XMLDocument.readyState的权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆