Setting up a working export in JSFiddle
Setting up a working export in JSFiddle
jhfrench
Posts: 15Questions: 0Answers: 0
I'm having a very difficult time getting export to CSV/Excel/PDF working in JSFiddle. Please see http://jsfiddle.net/jhfrench/6b74w/64/
When I look at the JavaScript console for http://fiddle.jshell.net/jhfrench/6b74w/64/show/light/ I see [quote]GET http://fiddle.jshell.net/jhfrench/6b74w/64/show/light/media/swf/copy_csv_xls_pdf.swf 404 (NOT FOUND) ZeroClipboard.js:52[/quote]
This error surprises me because I thought I set the path to the SWF file with this code:
[code]
...
"oTableTools": {
"sSwfPath": "http://datatables.net/release-datatables/extras/TableTools/media/swf/copy_csv_xls_pdf.swf"
}
...[/code]
How can I get this JSFiddle to demonstrate the export features?
When I look at the JavaScript console for http://fiddle.jshell.net/jhfrench/6b74w/64/show/light/ I see [quote]GET http://fiddle.jshell.net/jhfrench/6b74w/64/show/light/media/swf/copy_csv_xls_pdf.swf 404 (NOT FOUND) ZeroClipboard.js:52[/quote]
This error surprises me because I thought I set the path to the SWF file with this code:
[code]
...
"oTableTools": {
"sSwfPath": "http://datatables.net/release-datatables/extras/TableTools/media/swf/copy_csv_xls_pdf.swf"
}
...[/code]
How can I get this JSFiddle to demonstrate the export features?
This discussion has been closed.
Replies
When I change the selector to $('#task_list') it works.
See working JSFiddle at http://jsfiddle.net/jhfrench/6b74w/68/. Note that second table is no longer enhanced with DataTable plugin (I'd have to call the plugin on that table with a second call).
[code]
$('#task_list, #browser_data').each( function() {
$(this).dataTable({ ...your options here etc...});
});
[/code]
See http://jsfiddle.net/jhfrench/6b74w/80/