Quantcast
Channel: DataTables 1.9 — DataTables forums
Viewing all articles
Browse latest Browse all 1817

requested unknown parameter

$
0
0
Yes, another one. I've read the other posts on this topic but I'm still confused. The page works sometimes, and other pages using the same code work okay, but this one page is throwing this error. The debug info is at "uhamot" and it show 12 columns which is wrong. The query only returns 6 columns. Why does it work the first time but not on subsequent tries? It's also throwing an "oColumn is undefined" error. Here's my code:
    $('#paraminputbtn').live('click', (function() {
        $('#option').val($('#selectedtablefield').val());
        $('#selectedtablefield').val()
        $('#waitimgdiv').show();
        $('#resultdiv').fadeOut();
        $('#exportdiv').hide('fast');
        var params = $('.inputfield').serialize();
        $('#exportdiv').html('<a href="/mfgweb/ExcelDataExport?' + params + '" ' + 'target="blank">Download to Excel</a>');
        var oTable = $('#resulttable').dataTable();
        oTable.fnDestroy();

        $('#resulttable').dataTable({
            'bFilter': true,
            'bSort': false,
            'bServerSide': true,
            'bAutoWidth': true,
            'sAjaxSource': '/mfgweb/DataExportAjax',
            'bPaginate': true,
            'sScrollY': '400px',
            'sScrollX': '100%',
            'sPaginationType': 'full_numbers',
            'bScrollCollapse': true,
            'bJQueryUI': true,
            'fnRowCallback': function(nRow, aData, iDisplayIndex, iDisplayIndexFull) {
                var rowID = 'row' + iDisplayIndexFull;
                $(nRow).attr('id', rowID);
                if ($('#selectedtablefield').val() == 'compprodrep' && aData[0] != '') {
                    $(nRow).addClass('activerecord');
                }
                return nRow;
            },
            'fnServerData': function(sSource, aoData, fnCallback) {
                $.getJSON(sSource, aoData.concat($('.inputfield').serializeArray()), function(json) {
                    fnCallback(json);
                });
            },
            'fnInitComplete': function() {
                $('div#resultdiv').show('fast', function() {
                    $('#bodydiv').css('padding-bottom', '0px');
                    oTable.fnAdjustColumnSizing();
                    oTable.fnLengthChange(25);
                    $('#exportdiv').show('fast');
                    $('#waitimgdiv').fadeOut(1000);
                });
            }
        });
}));
Ideas?

Viewing all articles
Browse latest Browse all 1817

Trending Articles