$(function(){
oTable = $('.dataTable').dataTable({
"bJQueryUI": true,
"sPaginationType": "full_numbers",
"sDom": '<""f>t<"F"lp>'
});
var oTableTools = new TableTools( oTable, {
"sSwfPath": "http://crm_darkreport/js/dataTables/swf/copy_cvs_xls_pdf.swf",
"buttons": [
"copy",
"csv",
"xls",
"pdf",
{ "type": "print", "buttonText": "Print me!" }
]
} );
$('.tabletools').before( oTableTools.dom.container );
});
<div class=fix>
<div class=fix>
<div class=tabletools></div>
</div>
<div class="table">
<div class="head"><h5 class="iFrames">Contacts</h5></div>
<table cellpadding="0" cellspacing="0" border="0" class="display dataTable" id="example">
<thead>
<tr>
<th>Name</th>
<th>Address</th>
<th>City</th>
<th>State</th>
<th>Zip</th>
<th>Title</th>
<th>Email</th>
<th>Phone</th>
</tr>
</thead>
<tbody>
<?php echo $contactRows; ?>
</tbody>
</table>
</div>
</div>
<div class=fix>
<div class=fix>
<div class=tabletools></div>
</div>
<div class="table">
<div class="head"><h5 class="iFrames">Payments</h5></div>
<table cellpadding="0" cellspacing="0" border="0" class="display dataTable" id="example2">
<thead>
<tr>
<th>Invoice</th>
<th>Payment Date</th>
<th>Amount</th>
<th>Note</th>
</tr>
</thead>
<tbody>
<?php echo $accountRows; ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
I used "fnResizeButtons" as seen here: http://datatables.net/extras/tabletools/api
It looks like you're new here. If you want to get involved, click one of these buttons!
Get useful and friendly help straight from the source.