fnReloadAjax is not working with the latest version (1.10)
fnReloadAjax is not working with the latest version (1.10)
alesnav
Posts: 19Questions: 5Answers: 1
Hi there!
I am testing version 1.10 of DataTables (1_10_wip) and I love it! But I found a bug with the plugin fnReloadAjax (http://datatables.net/plug-ins/api#fnReloadAjax).
It does not work... something wrong with function fnServerParams, because I see the following error in Firebug:
-> this.oApi._fnServerParams is not a function
Allan, can you please check this?
Thanks!!
P.D.: I don't know if I may publish bugs of this dev version on Github... do you prefer them listed here or in Github?
I am testing version 1.10 of DataTables (1_10_wip) and I love it! But I found a bug with the plugin fnReloadAjax (http://datatables.net/plug-ins/api#fnReloadAjax).
It does not work... something wrong with function fnServerParams, because I see the following error in Firebug:
-> this.oApi._fnServerParams is not a function
Allan, can you please check this?
Thanks!!
P.D.: I don't know if I may publish bugs of this dev version on Github... do you prefer them listed here or in Github?
This discussion has been closed.
Replies
Yes, bug tracking in github is great. DataTables 1.10 has a reload Ajax method built in, `$().DataTable().ajax.reload();` (note the capital `D` to get the DataTables API instance). So fnReloadAjax is basically redundant now. However, given how often it is used, it is probably worth be updating the plug-in function to route the call to the new API so you only have to update the plug-in function, rather than ally he calling code. I'll make the change and commit it later on today.
Allan
If you are writing new code, then using the new API would be best, but absolutely this plug-in (and the others - I'll get around to them...) should be made to work with 1.10.
Allan
One little bug in your code:
Line 62: if ( typeof fnCallback == function' && fnCallback !== null )
It should be:
if ( typeof fnCallback == 'function' && fnCallback !== null )
Thanks Allan!
I'll look into it - thanks!
Allan
Thanks Allan!