Debug: Problems with nCell.className

Debug: Problems with nCell.className

zzzzzz Posts: 7Questions: 3Answers: 0

I'm using DataTables and I'm receiving an error in Internet Explorer 8 (The one that I need to work in)

The table is not sorting but only in Internet Explorer 8

This is what I'm getting debugging:

/* Classes */
if ( bClass )
{
nCell.className += ' '+oCol.sClass;
}
nCell.className 'nCell.className' es nulo o no es un objeto Error // Error is null or is not an object

Does anyone know why Is this happening? Am I missing something??
No problems with Chrome nor Firefox, even in Explorer 9 It's working. But I'm having this error in Explorer 8 and I don't know why.

Thanks in advance.

This question has an accepted answers - jump to answer

Answers

  • zzzzzz Posts: 7Questions: 3Answers: 0
    edited April 2015

    I will try to give as much info as I can.

    This error is related, but I wanted to show what is happenning. In case that anyone have had the same problem before.

    http://imagizer.imageshack.us/a/img661/6194/ggTqU2.png

    <div id = "datatbles" class="form-group-inner">    
        <table id="ratings_table" class="table table-bordered">
    <thead>
     <tr>
    <th class="th-small"><a><spring:message code="r" /></a></th>
    <th class="th-small" ><a><spring:message code="e" /></a></th>
    <th class="th-small"><a><spring:message code="g" /></a></th>
    <th class="th-small"><a><spring:message code="r" /></a></th>
     <th class="th-small" ><a><spring:message code="v" /></a></th>
    <th class="th-small"><a><spring:message code="a1" /></a></th>
    <th class="th-small"><a><spring:message code="a2" /></a></th>
    <th class="th-small"><a><spring:message code="es" /></a></th>
    <th class="th-small"><a><spring:message code="ac" /></a></th>
     <th class="th-small noVisible"><a><spring:message code="r" /></a></th>
    </tr>
    </thead>
    
    $(document).ready(function() {
        alert("In table");
        $('#dataTable').dataTable( {
            "sDom": "<'datatables-action-box'<'span6'<'dataTables_rango'>><'span6'>r>t<'datatables-action-box'<'span6'<'dataTables_rango'>><'span6'p>>",
            "aaSorting": [[9, "asc"]],
            "aoColumns": [
                            {"aDataSort": [ 9, 0 ] },
                            null, 
                            null, 
                            null, 
                            null, 
                            null,
                            null,
                            null,
                            null,
                            null, //noVisible
                            //{ "bSortable": false } //
                            ],               
            "oLanguage": {
                "sLengthMenu": Globalize.localize("label.home.table.sLengthMenu"),
                "sInfo": Globalize.localize("label.home.table.sInfo"),
                "sInfoEmpty": Globalize.localize("label.home.table.sInfoEmpty"),
                "sInfoFiltered": Globalize.localize("label.home.table.sInfoFiltered"),
                "sSearch": Globalize.localize("label.home.table.sSearch"),
                "sZeroRecords": Globalize.localize("label.home.table.sZeroRecords"),
                "sFirst": Globalize.localize("label.home.table.sFirst"),
                "sPrevious": Globalize.localize("label.home.table.sPrevious"),
                "sNext": Globalize.localize("label.home.table.sNext")
            },
            "sPaginationType": "four_button"
        } );            
    
    
    /* Variables */
    var buttonCustom = $("#buttonCustom");
    var buttonPlaceholder = $(".dataTables_rango");
    buttonPlaceholder.html(buttonCustom);
    
    
    });
    

    Thank you all!

  • allanallan Posts: 63,235Questions: 1Answers: 10,417 Site admin
    Answer ✓

    null,

    You have a trailing comma. IE8 incorrectly thinks that means that there is another item (undefined) at the end of the array... Good old IE :-)

    Allan

  • zzzzzz Posts: 7Questions: 3Answers: 0

    I've just tried and It looks great! Thank you very much!

    I was afraid It couldn't work in IE8 after trying so many things readen everywhere about It. As simple as a comma (the last one).

    Thanks again!

This discussion has been closed.