How do i get the various ajax messages for success, failures etc? i want to alert the success and error values to the user . Here is my code below
I think 200 is for success.. how do i access the success and failure values so i can alert them and do something based on that
$(function () {
$("#save").click(function () {
$.ajax({
type: "POST",
url: "some.json",
data: json_data,
contentType: 'application/json',
success: function () {
//if success forward to landing page else return to form for correctiion
}
});
});
});
more options for the jqXHR onject: http://api.jquery.com/jQuery.ajax/#jqXHR