TableTools: Undefined: evaluating 'f.buttonCounter'
TableTools: Undefined: evaluating 'f.buttonCounter'
Please can someone help me track down this error:
[code]TypeError: 'undefined' is not an object (evaluating 'f.buttonCounter')[/code]
The console reports the error is in TableTools.min.js and if I remove the TableTools functions, the error disappears. I have four tables in the same page and they all use exactly the same code to (except where names/IDs/vars apply to each table). Here is one example of the code:
[code]
$('#comments-today-table').addClass('data-table', 'dataTable').dataTable({
"bJQueryUI": true,
"sPaginationType": "full_numbers",
"sDom": '<""l>t<"F"fp>',
"bRetrieve": true,
"bSort": true,
"bAutoWidth": false,
"aoColumns": [
{ "sWidth": "70%", "bSortable": false },
{ "sWidth": "15%" },
{ "sWidth": "15%", "sType": "date" }
],
});
var todayTable = $('#comments-today-table').dataTable();
var todayTableTools = new TableTools( todayTable, {
"aButtons": [
{
"sExtends": "collection",
"sButtonText": ' Export ',
"sButtonClass": "btn",
"aButtons":[
{"sExtends": "copy", "sButtonClass": "btn btn-mini"},
{"sExtends": "print", "sButtonClass": "btn btn-mini"},
{"sExtends": "csv", "sButtonClass": "btn btn-mini"},
{"sExtends": "xls", "sButtonClass": "btn btn-mini"},
{"sExtends": "pdf", "sButtonClass": "btn btn-mini", "sPdfOrientation": "landscape",
"sTitle": "{{myRateableItem}}, {{myProduct}}: Comments for {{today|date:'F, Y'}} - theQRust.com"
}
]
}
],
"sSwfPath": "static/swf/copy_csv_xls_pdf.swf",
});
$('#comments-today-table_filter').append(todayTableTools.dom.container);
[/code]
I can't link to the page or post the contents to jsFiddle unfortunately, but if anyone can give me an idea as to how I can resolve this issue, I would be very grateful!
[code]TypeError: 'undefined' is not an object (evaluating 'f.buttonCounter')[/code]
The console reports the error is in TableTools.min.js and if I remove the TableTools functions, the error disappears. I have four tables in the same page and they all use exactly the same code to (except where names/IDs/vars apply to each table). Here is one example of the code:
[code]
$('#comments-today-table').addClass('data-table', 'dataTable').dataTable({
"bJQueryUI": true,
"sPaginationType": "full_numbers",
"sDom": '<""l>t<"F"fp>',
"bRetrieve": true,
"bSort": true,
"bAutoWidth": false,
"aoColumns": [
{ "sWidth": "70%", "bSortable": false },
{ "sWidth": "15%" },
{ "sWidth": "15%", "sType": "date" }
],
});
var todayTable = $('#comments-today-table').dataTable();
var todayTableTools = new TableTools( todayTable, {
"aButtons": [
{
"sExtends": "collection",
"sButtonText": ' Export ',
"sButtonClass": "btn",
"aButtons":[
{"sExtends": "copy", "sButtonClass": "btn btn-mini"},
{"sExtends": "print", "sButtonClass": "btn btn-mini"},
{"sExtends": "csv", "sButtonClass": "btn btn-mini"},
{"sExtends": "xls", "sButtonClass": "btn btn-mini"},
{"sExtends": "pdf", "sButtonClass": "btn btn-mini", "sPdfOrientation": "landscape",
"sTitle": "{{myRateableItem}}, {{myProduct}}: Comments for {{today|date:'F, Y'}} - theQRust.com"
}
]
}
],
"sSwfPath": "static/swf/copy_csv_xls_pdf.swf",
});
$('#comments-today-table_filter').append(todayTableTools.dom.container);
[/code]
I can't link to the page or post the contents to jsFiddle unfortunately, but if anyone can give me an idea as to how I can resolve this issue, I would be very grateful!
This discussion has been closed.
Replies
Allan