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


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:

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



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