We can find the exact error while using ajax() method of JQuery with the help of responseText property of the request parameter.
Here is the code.
$.ajax({
type: "post",
data: { id : 0 },
url: "getProfileDetails" ,
dataType: "html",
success: function (html)
{
alert (html);
}
error: function(XMLHttpRequest, textStatus, errorThrown)
{
alert(XMLHttpRequest.responseText);
}
});
References:-
http://api.jquery.com/jQuery.ajax/
0 comments:
Post a Comment