I\'m new to the DataTables jquery plugin. After discovering that IE 8 had performance issues with Javascript I decided to change the way I use DataTables to do server side
I ran into the same warning as well, but the cause was different. I had null values in my data. The JSON format was correct, but DataTables does not know have a default rule for displaying nulls. The solution was to use the sDefaultContent property.
Sample aaData:
aaData: [
{ "Field1": "Foo", "Field2":null },
{ "Field1": "Bar", "Field2":null },
]
And then on the aoColumns, you can use the property as follows:
aoColumns: [
{ "mData": "Field1", sDefaultContent: "n/a" },
{ "mData": "Field2", sDefaultContent: "" }
]
This is not your current problem, but you may encounter this issue in the future.
Hope this was helpful.
sDefaultContent option prevents displaying alert boxes only. Data tables wil not find the rule for displaying null values.
Changing null values in the table will eliminate this warning..
If it helps anyone I had a similar error because I had periods in my mRender function name:
My.Namespace.MyFunction(data, row);
This line:
var a = _fnSplitObjNotation( src );
Splits that into separate objects, which obviously generates an error.
Using
My_Namespace_MyFunction(data, row);
Additionally I noticed this error when passing a string function name instead of the JavaScript function object.
To avoid this error, your table number of "th" columns should equal to returning data columns(in numbers), in the above problem it is aaData.
"aaData" : [
[
"person_id" : "888888",
"ID" : "999999",
],
[
"person_id" : "8888889",
"ID" : "9999990",
]
]
This is correct format to return data from server side language. I have solved my problem in same way.
I was having this same problem this morning. You need to have the aoColumns
parameter and use mDataProp
As in this:
https://gist.github.com/1660712
At least it solved my problem.