DataTables warning: Attempted to initialise DataTables on a node which is not a table: FORM

datatablesjquery-plugins

I have this error message coming up after I have deployed DataTables inside of my application. I cannot see where this would be coming from as I haven't declared anything in my JS that would cause it. All the tables have got unique names and so do my divs. I have found this which was the same issue but his workaround doesn't seem to apply to my problem:

http://www.datatables.net/forums/discussion/7668/datatables-warning-attempted-to-initialise-datatables-on-a-node-which-is-not-a-table-div/p1

Anyone have any pointers? Google doesn't seem to be able to help so looking at you guys for assistance.

Cheers
Nick

UPDATE:

This is still causing me an issue. could anyone assist or point in the right direction?

Best Solution

You are probably using an id on the datatable whereas you are also declaring another item in the same page with the same id.

I had the same problem:

I had this in my code:

<div class="modal fade span3 ui-corner-all" id="cheques" style="display: none">

and I also had

 <table class="table table-nomargin dataTable table-bordered" id="cheques">

I renamed on of the element's id and it worked ;)

Related Question