简体   繁体   English

jQuery 2.1.3 Ajax访问被拒绝错误

[英]jQuery 2.1.3 Ajax Access Denied error

I have just updated to jQuery 2.1.3, and the Ajax calls are not working anymore. 我刚刚更新到jQuery 2.1.3,并且Ajax调用不再起作用。 Here is the code: 这是代码:

$.ajax({
    type: "GET",
    cache:false,
    url: "xml/"+xmlName,
    dataType: "xml",
    success: xmlParser,
    error: function(a, b, c) {
        alert(c); // this is where the errors happen, 'b' and 'c' are typically the only ones with values
    } // end error
});

The error is Access Denied on the alert() . 错误是对alert() Access Denied

This works fine with jQuery 1.10.2 (no errors) but I need to update so we can work with Adobe Edge which uses a later version of jQuery. 这在jQuery 1.10.2上正常工作(没有错误),但是我需要进行更新,以便我们可以与使用更高版本jQuery的Adobe Edge一起使用。 The build is not held on a server, just local testing at this stage so it cannot be a permission problem. 该构建不保存在服务器上,在此阶段仅进行本地测试,因此不会成为权限问题。

Any ideas? 有任何想法吗?

Since the bump from 1.10.x to 2.1.x has more than just ajax changes, you should be sure to check that other areas of the code that form the xmlName variable are still functioning as you expect them to. 由于从1.10.x到2.1.x的颠簸不仅具有ajax更改,因此您应确保检查形成xmlName变量的代码的其他区域是否仍按预期运行。 A major version bump like this can effect more than the single part of the code you're looking at. 像这样的主要版本颠簸不仅会影响您正在查看的代码的单个部分。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM