Error: oColumn is undefined
Error: oColumn is undefined
First hello to all and thanks for this great script.
Version: 1.6.2
oColumn is undefined
Line 5110 oSettings.aaSorting[i][1] = oColumn.asSorting[0];
I'm running into this error on initializing, the data is requested by AJAX and an example result looks like:
[code]
{
"sEcho": 0,
"iTotalRecords": 1380,
"iTotalDisplayRecords": 2,
"aaData": [
[
"1",
"REQUEST.test",
"\">XXX",
"/?id=1&test=%22%3EXXX",
"80.153.61.21",
"8",
"85.13.131.86",
"2009-05-11 12:42:42"
],
[
"2",
"GET.test",
"\">XXX",
"/?id=1&test=%22%3EXXX",
"80.153.61.21",
"8",
"85.13.131.86",
"2009-05-11 12:42:42"
]
]
}
[/code]
Changed: Corrected the JSON result
My call is:
$(document).ready(function() {
$('#logdata').dataTable( {
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "manager/index.php?a=112&id=3&getdata=1"
} );
} );
The table is defined as:
[code]
ID
Name
Value
Page
IP Address
Impact
Origin
Created
Loading data from server
ID
Name
Value
Page
IP Address
Impact
Origin
Created
[/code]
Does someone now what the problem might be?
Regards
Stefanie
Version: 1.6.2
oColumn is undefined
Line 5110 oSettings.aaSorting[i][1] = oColumn.asSorting[0];
I'm running into this error on initializing, the data is requested by AJAX and an example result looks like:
[code]
{
"sEcho": 0,
"iTotalRecords": 1380,
"iTotalDisplayRecords": 2,
"aaData": [
[
"1",
"REQUEST.test",
"\">XXX",
"/?id=1&test=%22%3EXXX",
"80.153.61.21",
"8",
"85.13.131.86",
"2009-05-11 12:42:42"
],
[
"2",
"GET.test",
"\">XXX",
"/?id=1&test=%22%3EXXX",
"80.153.61.21",
"8",
"85.13.131.86",
"2009-05-11 12:42:42"
]
]
}
[/code]
Changed: Corrected the JSON result
My call is:
$(document).ready(function() {
$('#logdata').dataTable( {
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "manager/index.php?a=112&id=3&getdata=1"
} );
} );
The table is defined as:
[code]
ID
Name
Value
Page
IP Address
Impact
Origin
Created
Loading data from server
ID
Name
Value
Page
IP Address
Impact
Origin
Created
[/code]
Does someone now what the problem might be?
Regards
Stefanie
This discussion has been closed.
Replies
Without getting too in depth into your code... I noticed upon inspection that your inner arrays of "aaData" have a trailing comma. To me this would signify an undefined column value.
["1","REQUEST.test","/">XXX","/?id=1&test=%22%3EXXX","80.153.61.21","8","85.13.131.86","2009-05-11 12:42:42",]
Notice the "," after ':42",' ...
Joel
thank you for seeing that comma, but unfortunately it does not solve my problem.
Stefanie
[code]
Loading data from server
[/code]
...looks suspicious. It's like its trying to match that one "colspan='8'" column to the the other 8 "" tags you have above. Have you tried just putting a tag w/ nothing inside it?
E.g.:
[code]
[/code]
Thank you, but it didn't solve the problem.
I took the table from here: http://datatables.net/examples/data_sources/server_side.html
[code]
Loading data from server
[/code]
The difference is, that the example has five columns and my table has eight.