javascript - Datatables ajax auto reload when parse error -


i using datatables ajax load data server side, know how stop/disable reload when parse error happen.

this sample code in laravel.

$(function () {         $('#users-table').datatable({             dom: 'lfrtip',             processing: false,             serverside: true,             autowidth: false,             ajax: {                 url: '{{ route("admin.access.user.get") }}',                 type: 'post',                 data: {status: 1, trashed: false},                 error: function (xhr, err) {                     if (err === 'parsererror'){                         console.log(1234)                         // location.reload();                     }                                             }             },             columns: [                 {data: 'last_name', name: '{{config('access.users_table')}}.last_name'},                 {data: 'first_name', name: '{{config('access.users_table')}}.first_name'},                 {data: 'email', name: '{{config('access.users_table')}}.email'},                 {data: 'confirmed', name: '{{config('access.users_table')}}.confirmed'},                 {data: 'roles', name: '{{config('access.roles_table')}}.name', sortable: false},                 {data: 'social', name: 'social', sortable: false},                 {data: 'created_at', name: '{{config('access.users_table')}}.created_at'},                 {data: 'updated_at', name: '{{config('access.users_table')}}.updated_at'},                 {data: 'actions', name: 'actions', searchable: false, sortable: false}             ],             order: [[0, "asc"]],             searchdelay: 500         });     }); 

i want debug error data response server when ajax called, function in datatables reload when parse error. can create breakpoints use browser don't want now. has idea?

laravel v5.4 jquery datatables v1.10.15


Comments

Popular posts from this blog

angular - DownloadURL return null in below code -

python 2.7 - Given three nested dictionaries, sort the top two nested dictionaries from a value in the innermost dictionary? -