length is null
length is null
I am trying to set up a customer list using data tables. ie.
$(document).ready(function() {
var oTable = $('#DTexample').dataTable({
"bJQueryUI": true,
"bStateSave": true,
"sPaginationType": "full_numbers"
});
new FixedHeader( oTable );
} );
I have run into trouble when I have a customer with a single quote (') in their name. I have tried to replace it with blank, but still I get this error...
Message: 'length' is null or not an object
Line: 719
Char: 4
Code: 0
URI: http.../JavaScripts/jquery.dataTables.js
Any ideas what I need to do? Thank you!
$(document).ready(function() {
var oTable = $('#DTexample').dataTable({
"bJQueryUI": true,
"bStateSave": true,
"sPaginationType": "full_numbers"
});
new FixedHeader( oTable );
} );
I have run into trouble when I have a customer with a single quote (') in their name. I have tried to replace it with blank, but still I get this error...
Message: 'length' is null or not an object
Line: 719
Char: 4
Code: 0
URI: http.../JavaScripts/jquery.dataTables.js
Any ideas what I need to do? Thank you!
This discussion has been closed.
Replies
I define the column types as a custom one as defined in one of my plugins :
[code]
{ "sType": "locale" }
[/code]
Do I need to announce other parts of the program that this is a new column type?
Interesting thing is that in Chrome I tried to put a breaking point on that part and the script does not seem to even pass through that point.
--FIX--
In my case was an IE superduper wish to be more correct than Doug Crockford. Notice the last coma in the array. My bad.
[code]
"aoColumns": [
{ "sType": "html" },
{ "sType": "locale" },
{ "sType": "percent" },
{ "sType": "locale" },
{ "sType": "percent"},
{ "sType": "locale" },
{ "sType": "percent" },
{ "sType": "locale" },
{ "sType": "percent" },
{ "sType": "locale" },
{ "sType": "percent" },
{ "sType": "locale" },
{ "sType": "percent" },
],
[/code]