我的JavaScript代码 -AJAX函数调用成功
function updateWhatIfPrivacyLevelRemove(recordId, correspondingDetailIDs) {
var ajaxCall = $.ajax({ data: { Svc: cntnrRoot,
Cmd: 'updateWhatIfPrivacyLevel',
updatePrivacyAction: 'Remove',
recordID: recordID
},
dataType: "text",
context: this,
cache: false
});
$.when(ajaxCall).then(updateWhatIfPrivacyLevelRemoveSuccess(recordID, correspondingResidentDetailIDs));
}
function updateWhatIfPrivacyLevelRemoveSuccess(recordID, correspondingResidentDetailIDs) {
//several other lines of non-related code
$.ajax({ data: { Svc: cntnrRoot,
Cmd: 'handleResidentRow',
recordID: 1,
active: 0
},
dataType: "text",
context: this,
cache: false
});
}
我的C#代码中我处理回调的 'updateWhatIfPrivacyLevel' 和 'handleResidentRow'。我可以告诉在updateWhatIfPrivacyLevel之前调用了handleResidnetRow的AJAX回调。
为什么?