Datatable Empty
Datatable Empty
Hornist
Posts: 9Questions: 1Answers: 0
I am trying to populate a DataTable with an AJAX query that returns JSON.
I am trying to duplicate the example shown at:
http://www.datatables.net/release-datatables/examples/ajax/objects.html
What happens is that the data never shows up in the table. I also do not see anything firing in the console that would reach out to the url defined as sAjaxSource.
[code]
$(document).ready(function() {
var oTable = $('#userList').dataTable( {
"bRetrieve": true,
"bProcessing": true,
"sAjaxSource": "/index.php?controller=identity&action=getUserListFull",
"aoColumns": [
{ "mData": "firstName" },
{ "mData": "lastName" },
{ "mData": "userEmail" },
{ "mData": "cellPhone" },
{ "mData": "addressLineOne" }
]
} );
} );
[/code]
I am trying to duplicate the example shown at:
http://www.datatables.net/release-datatables/examples/ajax/objects.html
What happens is that the data never shows up in the table. I also do not see anything firing in the console that would reach out to the url defined as sAjaxSource.
[code]
$(document).ready(function() {
var oTable = $('#userList').dataTable( {
"bRetrieve": true,
"bProcessing": true,
"sAjaxSource": "/index.php?controller=identity&action=getUserListFull",
"aoColumns": [
{ "mData": "firstName" },
{ "mData": "lastName" },
{ "mData": "userEmail" },
{ "mData": "cellPhone" },
{ "mData": "addressLineOne" }
]
} );
} );
[/code]
This discussion has been closed.
Replies
Allan