fnStateSave fnStateLoad
fnStateSave fnStateLoad
I'm trying to use the fnStateLoad/fnStateSave callbacks to load/save the state from/to a server side database. I've seen the examples and added the code to my project but neither function ever seems to get triggered. I have bStateSave set to true (and it seems to work but via cookies instead of my database.) I've added a simply alert command within the fnStateSave function to see when it's triggered and to see what the data looks like but it never gets triggered. I'm not getting any JavaScript errors. A related questions is, how large does the database field need to be in order to save the state data?
This discussion has been closed.
Replies
> Perhaps this is related: I'm using fnReloadAjax to get the data rather than having it populated when the html page is first loaded. Is that the reason it never gets triggered?
It should still get triggered, but I'm not sure what effect that would have on the reloading of the state - i.e. DataTables might try to restore paging to page 10, but if there is no data, then it can only show the first page.
Allan
Allan