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),
精彩评论