data
is the response you get back from the server. It depends on the dataType
that you specify. If you specify json
as the argument to the dataType
parameter, jQuery will interpret the data received from the server as json
.
textStatus
gives you information about the response, as in whether it was successful, or if something bad happened. Possible values are:
success
error
notmodified
timeout
parsererror
If your success
handler is called, then the value of textStatus
is most likely success
.
You will get a parsererror
if the data is of an unexpected type. For example, if you specified that dataType
is json
, but the server returned XML, you will get a parsererror
and your error
handler will be called.