开发者

Error in processing ajax jquery

is giving an error that can not capture with firebug, I wonder what's wrong with this code?

var obj = {}; obj.registry= $("#ctl00_ContentPlaceHolder1_TextBox3").val();
    $.ajax({
        type: "POST",
        url: "Page.aspx/PatientCheck",
        data: JSON.stringify(obj.toString()),
        contentType: "application/json; charset=utf-8",
        dataType: "json",
        success: function(msg)
开发者_如何学Go        {
            isErrror= true;
        },
        error: function()
        {

        }
    });

this code is to validate that there are already a patient with the same code, so the validator.


either

data: {str: JSON.stringify(obj)}

or

data: obj


Change this line:

data: JSON.stringify(obj.toString()),

To this:

data: JSON.stringify(obj),
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜