get sEcho with bServerSide = false and sAjaxSource and fnReloadAjax
get sEcho with bServerSide = false and sAjaxSource and fnReloadAjax
First thanks for this great jQuery add-on :)
I build a web phonebook for my company (querying LDAP). So I have some filter fields in a form submitted to php. The results are displayed with DataTables. But LDAP doesn't support good paging or sorting, so I turnded off bServerSide and call fnReloadAjax on every input change to get the data.
The problem is if I filter for eg surname beginning with "an" 2 change events are firing (one for "a" one for "an") the second request will get answered faster and displayed first. Then the big answer of the first request will come back and overrides the right answer.
So typing slowly "an" will display the results of the "a" search.
sEcho would solve this problem but i need bServerSide = false for sorting and paging on client side.
Any solution?
I build a web phonebook for my company (querying LDAP). So I have some filter fields in a form submitted to php. The results are displayed with DataTables. But LDAP doesn't support good paging or sorting, so I turnded off bServerSide and call fnReloadAjax on every input change to get the data.
The problem is if I filter for eg surname beginning with "an" 2 change events are firing (one for "a" one for "an") the second request will get answered faster and displayed first. Then the big answer of the first request will come back and overrides the right answer.
So typing slowly "an" will display the results of the "a" search.
sEcho would solve this problem but i need bServerSide = false for sorting and paging on client side.
Any solution?
This discussion has been closed.
Replies
Allan
I whink I will use a global JS var sEcho and I will only run ClearTable+AddData if the response sEcho is equal the JS sEcho.