aoData null when using turbolinks
aoData null when using turbolinks
Hi,
First of all I'm not experienced javascript programmer. I'm using in my application turbolinks. When I make full page reload everything is fine with datatables, but when I go to another page and back oTable.fnGetData(rowIndex) throws Cannot read property 'aoData' of null. Why aoData is null. Is there any easy solution for this problem?
Thanks for help, regards!
First of all I'm not experienced javascript programmer. I'm using in my application turbolinks. When I make full page reload everything is fine with datatables, but when I go to another page and back oTable.fnGetData(rowIndex) throws Cannot read property 'aoData' of null. Why aoData is null. Is there any easy solution for this problem?
Thanks for help, regards!
This discussion has been closed.
Replies
Allan
http://live.datatables.net/idinat/16/
Thank you very much !
However, you are passing in a row id into fnGetData . It expects a node or an index - _not_ an id.
Just use:
[code]
var data = table.fnGetData( $(this).parents('tr')[0] );
[/code]
rather than than mucking around with ids.
Allan
Uncaught TypeError: Cannot read property 'aoData' of null jquery.dataTables.js?body=1:5715
fnGetData jquery.dataTables.js?body=1:5715
Turbolinks allows you to change only body and the title in the head of your site instead downloading css and js everytime. I think it is something similiar to pjax if you heard.
Do you have any idea ?
Thanks !
Thank's for help !
Allan
To reproduce the problem I must go to site with datatable go to another site using push state (Turbolink) and go back to datatable site, then I have aoData null.
Caveats: After change page (via pushState, read Turbolink) the global js is not cleaned.
Thanks for your time :)
Allan