Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 81669

Load new data via Ajax

$
0
0
Hi Everyone,

I'm using jQuery 1.3.2, Django and DataTables 1.4.

I have a series of drop-downs that filter an object by foreign keys. When a selection is made, an Ajax call is fired, Django renders my JavaScript where I am dynamically creating the table, iterating over objects, etc, and then I eval the returned JavaScript to update the page.

I'm having an awfully hard time getting options like hidden columns and row-level callbacks to fire. Populating the Data Table this way is a snap, and is working properly, but evaling something like:

$('#my_table').dataTable(...{function(nRow, aData, iDisplayIndex){$('td:eq(1)', nRow).html('foo');}...);

Throws all sorts of errors. Am I going about re-populating the Data Table from a dynamic source in the correct manner? If not, what is the preferred way?

TIA,
Brandon

Viewing all articles
Browse latest Browse all 81669

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>