Q:

ajax error

$.ajax({
    type: "post", url: "/SomeController/SomeAction",
    success: function (data, text) {
        //...
    },
    error: function (request, status, error) {
        alert(request.responseText);
    }
});
0
 $.ajax({

   url     : "file.php",
   method  : "POST",

       data: { 

         //key                      :   value 
         action                   	:   action , 
         key_1   					:   value_key_1,
         key_2   					:   value_key_2
       }
   })

   .fail(function() { return false; })

	// Appel OK
   .done(function(data) {

   console.log(data);

 });
11
fail: function(xhr, textStatus, errorThrown){
	alert('request failed');
}
0

New to Communities?

Join the community