requested unknown parameter
requested unknown parameter
jkrobbins
Posts: 32Questions: 3Answers: 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:
[code]
$('#paraminputbtn').live('click', (function() {
$('#option').val($('#selectedtablefield').val());
$('#selectedtablefield').val()
$('#waitimgdiv').show();
$('#resultdiv').fadeOut();
$('#exportdiv').hide('fast');
var params = $('.inputfield').serialize();
$('#exportdiv').html('Download to Excel');
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);
});
}
});
}));
[/code]
Ideas?
[code]
$('#paraminputbtn').live('click', (function() {
$('#option').val($('#selectedtablefield').val());
$('#selectedtablefield').val()
$('#waitimgdiv').show();
$('#resultdiv').fadeOut();
$('#exportdiv').hide('fast');
var params = $('.inputfield').serialize();
$('#exportdiv').html('Download to Excel');
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);
});
}
});
}));
[/code]
Ideas?
This discussion has been closed.
Replies
[code]
console.log( $('#resulttable').html();
[/code]
it does look like there are 12 columns in the HTML from the debug trace.
Allan