Uncaught ReferenceError: ZeroClipboard_TableTools is not defined
Uncaught ReferenceError: ZeroClipboard_TableTools is not defined
I am attempting to enable the Export features provided by TableTools plug-in, but am getting the error in my de-bug console "Uncaught ReferenceError: ZeroClipboard_TableTools is not defined "
ZeroClipboard.js is referenced in my code and it is in the proper directory. I have also set an absolute path for the swf file and am able to access it by following the link to the file.
I may not be utilizing the sDom properly with calling both the filter widgets and Tabletools so any help would be greatly appreciated:
Here is my code:
$(document).ready(function () {
var oTable = $('#responsetable').dataTable( {
"bJQueryUI": true,
"sPaginationType": "full_numbers",
"sDom": '<"clear">WRCT<"clear">lfrtip<"clear">',
"oTableTools": {
"sSwfPath": "http: sites/default/files/Tools/copy_csv_xls_pdf.swf"
},
"aaSorting": [[ 3, "desc" ]],
"bAutoWidth": false,
"aoColumns": [
{"sWidth": "5%"},
{"sWidth": "40%"},
{"sWidth": "25%"},
{"sWidth": "5%"},
{"sWidth": "5%"},
{"sWidth": "10%"},
{"sWidth": "10%"},
],
"oColumnFilterWidgets": {
"aiExclude": [ 1, 2, 3, 4, 5 ]
},
});
});
ZeroClipboard.js is referenced in my code and it is in the proper directory. I have also set an absolute path for the swf file and am able to access it by following the link to the file.
I may not be utilizing the sDom properly with calling both the filter widgets and Tabletools so any help would be greatly appreciated:
Here is my code:
$(document).ready(function () {
var oTable = $('#responsetable').dataTable( {
"bJQueryUI": true,
"sPaginationType": "full_numbers",
"sDom": '<"clear">WRCT<"clear">lfrtip<"clear">',
"oTableTools": {
"sSwfPath": "http: sites/default/files/Tools/copy_csv_xls_pdf.swf"
},
"aaSorting": [[ 3, "desc" ]],
"bAutoWidth": false,
"aoColumns": [
{"sWidth": "5%"},
{"sWidth": "40%"},
{"sWidth": "25%"},
{"sWidth": "5%"},
{"sWidth": "5%"},
{"sWidth": "10%"},
{"sWidth": "10%"},
],
"oColumnFilterWidgets": {
"aiExclude": [ 1, 2, 3, 4, 5 ]
},
});
});
This discussion has been closed.
Replies
But we'd need a link to the page to be sure - I'm just guessing: http://datatables.net/forums/discussion/12899/post-test-cases-when-asking-for-help-please-read
Allan
I apologize for not posting a link, I read the policy, but it is quite difficult to deliver my page or even a sample of it. I am working with Datatables within a Salesforce VisualForce page that requires log-in.
As mentioned in my post, I can tell you that ZeroClipboard.js is being loaded as it shows up as a resource in Chrome developer tools. Is there anything else you think might be causing this error?
The error is being thrown in TableTools.js if that is at all helpful.
Allan
The error is being thrown at line 1290 for the _fnFlashConfig: in TableTools.js
var that = this;
var flash = new ZeroClipboard_TableTools.Client();
Allan