Quantcast
Channel: DataTables 1.9 — DataTables forums
Viewing all articles
Browse latest Browse all 124

Ajaxcall back ? possible

$
0
0

Hello,
I am having situation where table works fine with json returned from server.
However If server auth is expired , it returns json as {"success":false} instead of standard datatable formatted json.
I have dfined a global ajax function like this ..
$(document).ajaxSuccess(function (event, xhr, settings) { if (xhr.responseJSON && xhr.responseJSON.expired) { $("#logout").trigger('click'); } });

It works on all ajax requests but doesnt work with datatables.
Any help will be appreciated to solve this issue that if returned json is {"success":false} , i should be able to call a click or some function.


Viewing all articles
Browse latest Browse all 124

Trending Articles