length is null

length is null

dangeldangel Posts: 5Questions: 0Answers: 0
edited February 2011 in General
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!

Replies

  • valugivalugi Posts: 1Questions: 0Answers: 0
    edited March 2011
    I got the same thing only in windows - IE8. I am using dataTables 1.7.5 (and tested with 1.7.6) and I have a custom sorter.

    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]
This discussion has been closed.