$ .Ajax的返回是否停止执行Parent函数中的进一步步骤?

时间:2019-05-30 03:36:55

标签: ajax

我在deletePayment函数内部进行了ajax调用。在ajax的“成功”部分中,有一个return语句。我需要知道此返回值是否也会从函数'deletePayment'中消失。

function deletePayment(id) {
    if(em(id)) {
        return false;
    }
    window.status = "Deleting Payment...";
    var returnVal = false;
    setDataIsland("PaymentData", "paymentid", id);
    $.ajax({
        type: "POST",
        async: false,
        dataType: "xml",
        data: sendDataIsland("PaymentData"),
        url: "/xml/getPayment.asp",
        success: function(data) {
            if(left($(data).find("status").text(), 3) != "ERR") {
                $("#BillToID").val($(data).find("billtoid").text());
                if(!checkAccess("PAYMENT", "D", $(data).find("branchid").text())) {
                    alert("You do not have permission to perform this function.");
                    window.status = "";
                    $("#BillToID").val("");
                    return;
                }
            }
        }
    });
    window.status = "";
    return returnVal;
}

0 个答案:

没有答案