Problems with fnReloadAjax erroring with oSettings is null
Problems with fnReloadAjax erroring with oSettings is null
hottiger
Posts: 5Questions: 0Answers: 0
Hi,
I currently have DataTables fetching content, I then observe an onchange event on a select menu and call fnReloadAjax with a new url.
I then do a history pushState to another page and load in some html via ajax, replacing the DataTable with something else.
However when I come back to that page (again via a pushState event) and call fnReloadAjax via the select menu I get the error:
oSettings is null
fnReloadAjax(oSettings=null, sNewSource="/some_url/").
I tried calling the fnReloadAjax function again after my ajax request but that didn't help.
Has anybody ever encountered this? I'll try and get an example up later on.
Thanks
I currently have DataTables fetching content, I then observe an onchange event on a select menu and call fnReloadAjax with a new url.
I then do a history pushState to another page and load in some html via ajax, replacing the DataTable with something else.
However when I come back to that page (again via a pushState event) and call fnReloadAjax via the select menu I get the error:
oSettings is null
fnReloadAjax(oSettings=null, sNewSource="/some_url/").
I tried calling the fnReloadAjax function again after my ajax request but that didn't help.
Has anybody ever encountered this? I'll try and get an example up later on.
Thanks
This discussion has been closed.
Replies
When you come back to your page, what is in the array $.fn.dataTableSettings ? That is the array that holds all DataTables settings objects, so if that is empty then something has deleted it (destroying the table?).
Allan
There is data in $.fn.dataTableSettings, when comparing it to when it works I can't see any (obvious) difference. I'll hopefully get an example up tomorrow.
Thanks
http://staging.hottiger.co.uk/cms/content
Change a category and it works fine, then click on create article and then back and try again.