I am trying to use the newest tableTool 2.2.0 and i have made a little and simple example jsfiddle.net/9ZTGb/
COPY and PRINT buttons seems to respond, but the "Copy" is resulting "blank", and "CSV","Excel","PDF" seems not workinkg at all..
this is the table:
<table id="tblExport" class="table table-condensed">
<thead>
<tr>
<th>#</th>
<th>First Name</th>
<th>Last Name</th>
<th>Username</th>
<th>Status</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>Larry</td>
<td>Smith</td>
<td>@lsmith</td>
<td>Approved</td>
</tr>
<tr>
<td>2</td>
<td>Mark</td>
<td>Williams</td>
<td>@mwills</td>
<td>Pending</td>
</tr>
<tr>
<td>3</td>
<td>Jeremy</td>
<td>Jones</td>
<td>@jj</td>
<td>Success</td>
</tr>
<tr>
<td>4</td>
<td>Carlos</td>
<td>Martin</td>
<td>@cmar</td>
<td>Suspende</td>
</tr>
</tbody>
</table>
and this is the js script:
$(document).ready(function () {
$('#tblExport').dataTable({
"sDom": 'T<"clear">lfrtip',
"oTableTools": {
"sSwfPath": "https://datatables.net/release-datatables/extras/TableTools/media/swf/copy_csv_xls_pdf.swf",
"aButtons": ["copy", "csv", "xls", "pdf", "print"]
}
});
});
I would really appreciate if someone could tell me why it isn't working. the example here and the jsfiddle i tried to make as simple as possible, but still not really working..
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…