Home » » How To Find The Exact Error When Using $.ajax In JQuery?

How To Find The Exact Error When Using $.ajax In JQuery?

Rendyon | 2:32 AM | 0 comments
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)
{r
alert(XMLHttpRequest.responseText);
}
});

References:-
http://api.jquery.com/jQuery.ajax/
Share this article :

0 comments:

 
Copyright © 2011. Find Updates - All Rights Reserved
Template Modify by Creating Website
Proudly powered by Blogger