ajax return
ajax return
First let me say how much I love data tables!
I'm using it in a couple of places with data returned from sql via ajax and it works great!
I'm trying to add another table based on different data so in my ajax that is returned I'm trying to simulate the same return as I got from the sql data, but I'm just missing it somewhere. I've gone all over it and I don't see the issue.
I could really use a different set of eyes and if anyone sees my issue please let me know.
Here is the table initialization:
[code]
var aTable;
$().ready(function() {
aTable = $('#attributefighter').dataTable( {
"bProcessing": true,
"sAjaxSource": '/ajax.php?action=get_attributes&id=1',
"bSort" : false,
"bPaginate" : false,
"bAutoWidth" : true,
"bFilter" : false
} )
});
[/code]
and my ajax returns this (I believe the error is in here:
[code]
{ "aaData": [
["Agility", "21.00"],
["Endurance", "11.00"],
["Flexibility", "14.00"],
["Speed", "12.00"],
["Stamina", "11.00"],
["Strength", "11.00"],
["Ring Presence", "6"],
["Quickness", "104"],
["Power", "43"],
["Energy", "28"],
["Health", "56"]
] }
[/code]
Many thanks and thanks again for such a great product!
I'm using it in a couple of places with data returned from sql via ajax and it works great!
I'm trying to add another table based on different data so in my ajax that is returned I'm trying to simulate the same return as I got from the sql data, but I'm just missing it somewhere. I've gone all over it and I don't see the issue.
I could really use a different set of eyes and if anyone sees my issue please let me know.
Here is the table initialization:
[code]
var aTable;
$().ready(function() {
aTable = $('#attributefighter').dataTable( {
"bProcessing": true,
"sAjaxSource": '/ajax.php?action=get_attributes&id=1',
"bSort" : false,
"bPaginate" : false,
"bAutoWidth" : true,
"bFilter" : false
} )
});
[/code]
and my ajax returns this (I believe the error is in here:
[code]
{ "aaData": [
["Agility", "21.00"],
["Endurance", "11.00"],
["Flexibility", "14.00"],
["Speed", "12.00"],
["Stamina", "11.00"],
["Strength", "11.00"],
["Ring Presence", "6"],
["Quickness", "104"],
["Power", "43"],
["Energy", "28"],
["Health", "56"]
] }
[/code]
Many thanks and thanks again for such a great product!
This discussion has been closed.
Replies
Thanks again for the great product.
Good to hear you found it - thanks for the feedback :-)
Regards,
Allan