1.7 - Error: Invalid argument.

1.7 - Error: Invalid argument.

methodmanmethodman Posts: 3Questions: 0Answers: 0
edited June 2010 in Bug reports
Hi,

I'm getting this error when loading the page first time. Using 1.6 works everything just fine. This error occurs only in IE.
It's on line 49 char 367
[code]c.style.width=a.aoColumns[b].sWidth; [/code]

The value in sWidth is 'nullpx'

Replies

  • methodmanmethodman Posts: 3Questions: 0Answers: 0
    And my config

    [code]
    var grid1;

    $(document).ready(function() {

    grid1 = $('#grid').dataTable({
    "bProcessing": true,
    "bServerSide": true,
    "sPaginationType": "full_numbers",
    "sAjaxSource": "/Projekt/GedData",
    "bStateSave": true,
    "aoColumns": [
    { "sTitle": "IdM" },
    { "sTitle": "NazovM" },
    { "sTitle": "OzM" },
    { "sTitle": "DateM"}],
    "fnServerData": function(sSource, aoData, fnCallback) {
    $.ajax({
    "dataType": 'json',
    "type": "POST",
    "url": sSource,
    "data": aoData,
    "success": fnCallback
    });
    }
    });
    [/code]
  • Jason_tsaiJason_tsai Posts: 4Questions: 0Answers: 0
    edited June 2010
    HI,
    First,my english is poor. please forget me.

    Use version 1.7 bate 3 , I have the same problem in IE6 too. But this error won't occurs in MF.
    I check the sWidth value always is "nullpx" either construct in "aoColumns" with asign "sWidth" or not.
    (by the way, the value is effect in property "sWidthOrig" and it looks right.)

    Because I need the construct with "bDestory" feature and it only suport in version 1.7,

    I had edited function _fnDrawHead in line 2665 as follow and it's works:
    [code]
    //nTh.style.width = oSettings.aoColumns[i].sWidth;
    nTh.style.width = oSettings.aoColumns[i].sWidthOrig;
    [/code]
    I believe this change will effect something else in the js source, I just temporary change by this way for testing.
  • Jason_tsaiJason_tsai Posts: 4Questions: 0Answers: 0
    edited June 2010
    Hi,
    I trace the code to line 4916.
    The function _fnCalculateColumnWidths last part of code as follow...

    [code]
    var oNodes = $("thead tr:eq(0)>th", nCalcTmp);
    var iIndex, iConnector = 0;
    for ( i=0 ; i
  • allanallan Posts: 63,405Questions: 1Answers: 10,452 Site admin
    Hi Jason_tsai,

    Sorry for the delay in getting back to you - your post has been on my to-do list! I believe that the error is in the selector that DataTables is using, in-combination with the fact that you are using sTitle to generate the TH elements. The error is occurring because those elements have not yet been created! I've put in a fix for this and it will be available in beta 4 which should be out soon. I'd be very interested to hear how you get on with it.

    Regards,
    Allan
  • Jason_tsaiJason_tsai Posts: 4Questions: 0Answers: 0
    Hi~Allan,
    I have tested version 1.7.b7.
    This problem seem be fixed.

    DataTables is a great jquery plugin, I like this plugin very much.
    Thank you for your great maintain. ^^

    Regards

    Jason
This discussion has been closed.