如何解决失败的jquery AJAX成功问题 [英] How do resolve a failing jquery AJAX Success

查看:97
本文介绍了如何解决失败的jquery AJAX成功问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要做些什么来解决我的问题?升级到Windows 10 - 现在我的生产C#应用程序与jQuery AJAX失败的'成功:功能(数据,状态)'代码行(遇到错误)。应用程序中的其他jQuery函数在调试环境和生产中都能正常运行。此应用程序在调试模式下正常运行。



代码段:

$ .ajax(

{

类型:'GET',

url:url,

dataType:xml,

成功:函数(数据,状态){

//成功功能被激活后弹出错误提示消息

// ...

},

错误:function(){

alert(遇到错误!);

}});

What do I need to do to fix my problem? Upgraded to Windows 10 - Now my production C# apps with jQuery AJAX fails at 'success: function(data, status)' code line ("error encountered"). Other jQuery functions in the apps properly function in both debug environment and production. This app runs properly in debug mode.

Snippet:
$.ajax(
{
type: 'GET',
url: url,
dataType: "xml",
success: function (data, status) {
// Error alert message pops up after success function is envoked
// ...
},
error: function () {
alert("error encountered!");
} });

推荐答案

.ajax(

{

类型:'GET',

url:url,

dataType:xml,

成功:函数(数据,状态){

//在成功函数被激活后弹出错误警告消息

// ...

},

错误:function(){

alert(遇到错误!);

}});
.ajax(
{
type: 'GET',
url: url,
dataType: "xml",
success: function (data, status) {
// Error alert message pops up after success function is envoked
// ...
},
error: function () {
alert("error encountered!");
} });


添加ed to ajax的错误:function(e) - 结果是[object Object]。还使用了F12故障排除和本地显示数据'数据'未定义。在Windows 8下运行时没有发生此错误。



F12开发人员工具 - Microsoft Edge调用堆栈断点:

文件选项卡:MsAjaxJs < br $>


String.prototype.trim MsAjaxJs(1,7707)

[图书馆代码]

Anomymous function myapp( 157,17) - 我的生产C#应用程序的名称

[图书馆代码]



突出显示的MSAjaxJs代码:

... {return this.replace(/ ^ \s + | \s +
Added to ajax's error: function(e) - result is "[object Object]". Also used F12 troubleshoot and locals show "data" 'data' is undefined. This error did not occur when running under Windows 8.

F12 Developer Tools - Microsoft Edge Call Stack Breakpoints:
File tab: MsAjaxJs

String.prototype.trim MsAjaxJs(1, 7707)
[Library code]
Anomymous function myapp(157, 17) - name of my Production C# App
[Library code]

Highlighted MSAjaxJs code:
"...{return this.replace(/^\s+|\s+


/ g,)} ...
/g,"")}..."


这篇关于如何解决失败的jquery AJAX成功问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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