No matching records found
No matching records found
I'm pulling my hair out on this one. I've used datatables in the past and think it is great, but I can't seem to get this one working.
Here is my initialization code:
[code]
$().ready(function() {
$('#equipmentstore').dataTable( {
"bProcessing": true,
"sAjaxSource": '/ajax.php?action=get_equipment'
} )
});
[/code]
here is the html:
[code]
+
Brand
Item
Type
LVL
Quality
Bonuses
Price
+
Brand
Item
Type
LVL
Quality
Bonuses
Price
[/code]
and here is what the ajax call is returning:
[code]
{ "aaData": [
['link', '+'],
['Brand', 'my brand'],
['Item', 'Rigby Cat'],
['Type', 'cup'],
['Lvl', 'my level'],
['Quality', ''],
['Bonus', 'my bonus'],
['Price', '100.00']
]
}
[/code]
I'm sure the problem is something I'm doing but I just can't seem to find it.
Any help is greatly appreciated.
Here is my initialization code:
[code]
$().ready(function() {
$('#equipmentstore').dataTable( {
"bProcessing": true,
"sAjaxSource": '/ajax.php?action=get_equipment'
} )
});
[/code]
here is the html:
[code]
+
Brand
Item
Type
LVL
Quality
Bonuses
Price
+
Brand
Item
Type
LVL
Quality
Bonuses
Price
[/code]
and here is what the ajax call is returning:
[code]
{ "aaData": [
['link', '+'],
['Brand', 'my brand'],
['Item', 'Rigby Cat'],
['Type', 'cup'],
['Lvl', 'my level'],
['Quality', ''],
['Bonus', 'my bonus'],
['Price', '100.00']
]
}
[/code]
I'm sure the problem is something I'm doing but I just can't seem to find it.
Any help is greatly appreciated.
This discussion has been closed.
Replies
I'm not exactly sure where it was but I re-wrote that section and it is now working.
The issue (I suspect) is that your aaData arrays only have two elements in them for each row, but DataTables is expecting 8 (you've got 8 TH elements). Either way, if it's fixed now, we'll go with that :-)
Regards,
Allan