(SOLVED) Ajax Processing in Background

(SOLVED) Ajax Processing in Background

KonstantinKonstantin Posts: 9Questions: 0Answers: 0
edited December 2011 in General
I'm using datatables to show my server statistics i get over http (ajax/json). The tables are being refreshed every 5 minutes. I use bDestroy = true to update the data from server and redraw the tables.

While the data comes over HTTP the message "loading..." or "Processing..." is showed. In my case for abount 2-3 seconds.

Is it possible to load data in background without to destroy the table? And just after the whole data was loaded, the tables should be reloaded! So the user doesnt see the load process..

best regards
Konstantin

ps. I configure and draw tables useing functions, f.e. showGeneralStats(). In that function i build dataTables Object.
My reload function calls actually the same function showGeneralStats() to destroy existing table. Maybe i should use the "special" function that loads data and draw the table separatly. But i dont know, how to do it :(

Replies

  • allanallan Posts: 63,195Questions: 1Answers: 10,412 Site admin
    Sounds like the fnReloadAjax plug-in is what you want: http://datatables.net/plug-ins/api#fnReloadAjax

    Allan
  • KonstantinKonstantin Posts: 9Questions: 0Answers: 0
    Wow! Works great! Thank you))
This discussion has been closed.