DataTables warning: Attempted to initialise DataTables on a node which is not a table: DIV
DataTables warning: Attempted to initialise DataTables on a node which is not a table: DIV
Hi guys-
Having this problem which I can't diagnose. I am very, very new to DataTables. I am not doing anything too fancy ... just the zero config DataTables. I implemented one page just fine, but I am having a problem with a particular table of mine on a certain page. I am using symfony2 and twig to populate the table. I googled around and couldn't find a solution.
The js looks like:
[code]$(document).ready(function() {
$('.history').dataTable();
});
[/code]
I figured it would be most helpful to see the code after it is populated, so here's the source from choosing "View Source" in FF. I think it must be something subtle that I am just not seeing. My other table on a different page has a very similar structure, but I do not experience this error. One thing to note is that there is another table on this page (as opposed to the other page). This other table is table class="orders":
[code]
Transaction History
Date Executed
Transaction Details
Company
Quantity
Target
Purchase Price
Order Value
Account Value
October 28, 2011 14:43
Buy - Market
csx
2
Market Order
$5.00
$-2.00
$99987.00
[/code]
Thanks for any help.
-Melissa
Having this problem which I can't diagnose. I am very, very new to DataTables. I am not doing anything too fancy ... just the zero config DataTables. I implemented one page just fine, but I am having a problem with a particular table of mine on a certain page. I am using symfony2 and twig to populate the table. I googled around and couldn't find a solution.
The js looks like:
[code]$(document).ready(function() {
$('.history').dataTable();
});
[/code]
I figured it would be most helpful to see the code after it is populated, so here's the source from choosing "View Source" in FF. I think it must be something subtle that I am just not seeing. My other table on a different page has a very similar structure, but I do not experience this error. One thing to note is that there is another table on this page (as opposed to the other page). This other table is table class="orders":
[code]
Transaction History
Date Executed
Transaction Details
Company
Quantity
Target
Purchase Price
Order Value
Account Value
October 28, 2011 14:43
Buy - Market
csx
2
Market Order
$5.00
$-2.00
$99987.00
[/code]
Thanks for any help.
-Melissa
This discussion has been closed.
Replies
Total PEBKAC, sorry. Turns out, I named my div the same thing that I named my table and that caused some issues.