Uncaught InvalidStateError:尝试使用不可用或不再可用的对象

时间:2013-12-09 12:44:45

标签: javascript ajax

这是我得到的错误:

Uncaught InvalidStateError: 
An attempt was made to use an object that is not, or is no longer, usable. 

这是导致上述错误的代码:

function updateStudentDetails() {
    var name = $("#txtfull_name").val();
    var contact = $("#txtcontact_number").val();
    var status = $("#approval").val();
    var username = $("#UserName").val();
    var password = $("#Password").val();
    var ic_number = $("#txtic_number").val();
    var relation = $("#ddlrelation").val();
    var mail_id = $("#txtemailaddress").val();
    var address = $("#txtperm_address").val();
    var zipcode = $("#txtperm_postcode").val();
    var city = $("#txtperm_city").val();

    $.ajax({
        type: "POST",
        url: servicePath + "/ParentDetailsUpdate?",
        dataType: "xml",
        success: updateStudentDetailsSuccess,
        error: dataError,
        data: {
            id: currentParentId,
            name: name,
            contact: contact,
            status: status,
            username: username,
            password: password,
            ic_num: ic_number,
            relation: relation,
            mail_id: mail_id,
            address: address,
            taman_id: tamanId,
            zip_code: zipcode,
            city: city,
            payment: '0'
        }
    });
}

0 个答案:

没有答案