本文介绍了错误操作已中止的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我有以下脚本

Hi All,
I have the following script

function getJson(url) {
    var response;
    $.ajax({
        type: "POST",
        url: url,
        dataType: "jsonp",
        success: function (data) {
            response = data;
        }
    });
return response;
}





当我在IE调试器中运行此脚本时,我能够成功获得响应,但相同的代码给出了当我在sharepoint托管的应用程序中使用它时,操作已中止statusText中的错误。任何人都可以建议我做错了什么?供参考http://rate-exchange.appspot.com/currency?from=USD&to=PKR可用作网址。



谢谢,

Zafar



I am able to get the response successfully when I run this script in IE debugger but the same code gives "Operation Aborted" error in statusText when I am using it in a sharepoint-hosted app. Can anyone please suggest what I am doing wrong? For reference "http://rate-exchange.appspot.com/currency?from=USD&to=PKR" can be used as url.

Thanks,
Zafar

推荐答案





当我在IE调试器中运行此脚本时,我能够成功获得响应,但相同的代码给出了当我在sharepoint托管的应用程序中使用它时,操作已中止statusText中的错误。任何人都可以建议我做错了什么?供参考http://rate-exchange.appspot.com/currency?from=USD&to=PKR可用作网址。



谢谢,

Zafar



I am able to get the response successfully when I run this script in IE debugger but the same code gives "Operation Aborted" error in statusText when I am using it in a sharepoint-hosted app. Can anyone please suggest what I am doing wrong? For reference "http://rate-exchange.appspot.com/currency?from=USD&to=PKR" can be used as url.

Thanks,
Zafar



这篇关于错误操作已中止的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-16 03:47