TableTools: Undefined: evaluating 'f.buttonCounter'

TableTools: Undefined: evaluating 'f.buttonCounter'

Erve1879Erve1879 Posts: 3Questions: 0Answers: 0
edited November 2012 in General
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!

Replies

  • Erve1879Erve1879 Posts: 3Questions: 0Answers: 0
    I'm still battling with this problem, so would love it if anyone has any ideas?!!?
  • allanallan Posts: 63,213Questions: 1Answers: 10,415 Site admin
    We need a way to reproduce the error to be able to fix it. Please link to a test case: http://datatables.net/forums/discussion/12899/post-test-cases-when-asking-for-help-please-read

    Allan
  • Erve1879Erve1879 Posts: 3Questions: 0Answers: 0
    OK, thanks Allan. Our code is tightly integrated with Django that would be a bit of mission to get a working example into jsfiddle. I'll give it another bash and if I don't come right, I'll get something into jsfiddle.
This discussion has been closed.