以下是我收到错误的代码部分
if(whenToUploadKycDocs == "uploadNow"){
uploadKycDocsNow();
}else{
uploadKycDocsLater(); //error here
}
以下是uploadKycDocsLater()
function uploadKycDocsLater(){
uploadKycDocsLater = "uploadLater";
$.ajax({
url : uploadKycdocsLaterUrl,
type : 'POST',
datatype : 'json',
data : $('#uploadKyc-form').serialize(),
async : false,
success : function(uploadKycDocsLaterData) {
if(uploadKycDocsLaterData != "redirect"){
processJson(uploadKycDocsLaterData);
if(numberOfApplicants == "applicant-one"){
$("#firstApplicantDetails").show();
$("#secondApplicantDetails").hide();
$("#thirdApplicantDetails").hide();
$("#applicantTwoPreview").hide();
$("#applicantThreePreview").hide();
}
if(numberOfApplicants == "applicant-two"){
$("#firstApplicantDetails").show();
$("#secondApplicantDetails").show();
$("#thirdApplicantDetails").hide();
$("#applicantThreePreview").hide();
}
if(numberOfApplicants == "applicant-three"){
$("#firstApplicantDetails").show();
$("#secondApplicantDetails").show();
$("#thirdApplicantDetails").show();
}
$("#collapse8").collapse("show");
$("#collapse7").collapse("hide");
if(activeTabIndex >= currentTabIndex){
currentTabIndex = 7;
}
}else{
window.location.reload(true);
}
},
error : function(e) {
alert("Error");
}
});
}
显然,你可以看到uploadKycDocsLater()是一个函数,我是从条件调用,有另一个函数uploadKycDocsNow()工作正常。它也有类似于uploadKycDocsLater()的代码 可能是什么错误?