1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
$.ajax({ type: 'get', url: base_url + 'admin/' + control + '/sorting_data', data: params, dataType: 'json', success: function(data){ if(typeof data.status == 'undefined'){ alert(data); }else if(data.status == 'fail'){ alert(data.message); }else{ if(typeof callback == 'function'){ callback.call(null, data.data); } } }, error: function(data){ var errors = data.responseJSON; //show_response_error(errors); } }); |