Ajaxcall back ? possible

Ajaxcall back ? possible

babablacksheepbabablacksheep Posts: 41Questions: 23Answers: 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.

This discussion has been closed.