ajax return

ajax return

sifuhallsifuhall Posts: 20Questions: 0Answers: 0
edited October 2009 in General
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!

Replies

  • sifuhallsifuhall Posts: 20Questions: 0Answers: 0
    I found my issue. I had conflicting ids.

    Thanks again for the great product.
  • allanallan Posts: 61,762Questions: 1Answers: 10,111 Site admin
    Hi sifuhall,

    Good to hear you found it - thanks for the feedback :-)

    Regards,
    Allan
This discussion has been closed.