错误操作已中止 [英] Error Operation Aborted

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

问题描述

大家好,

我有以下脚本

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

推荐答案

.ajax({
type: POST
url:url,
dataType: jsonp
成功: function (数据){
response = data;
}
});
返回响应;
}
.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


你好Zafar,



我看到没有任何有用的答案你的问题,我想知道你是否在此期间自己找到了答案。

我希望你有,因为我正面临着你做/做的问题。

你介意跟我分享答案吗?



祝你好运,

Johnny O。
Hi Zafar,

I see that there is n't any useful answers to your problem, and I was wondering if you in the meantime have come up an answer yourself.
I hope you have, because I am the facing the problem as you do/did.
Would you mind sharing the answer with me ?

Best regards,
Johnny O.


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

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