mrkeck Sharing the Love

8Jan/140

TableTools in CodeIgniter

The key is using

"sSwfPath": "<?php echo base_url(JS.'media/swf/copy_csv_xls_pdf.swf');?>"

and store the "media/swf/copy_csv_xls_pdf.swf" in the resources JS folder.

"oTableTools": {
  "sSwfPath": "<?php echo base_url(JS.'media/swf/copy_csv_xls_pdf.swf');?>",
     "aButtons": [
	"copy",
	"print",
	{
	  "sExtends":    "collection",
	  "sButtonText": 'Save <span class="caret" />',
	    "aButtons":    [ "csv", "xls", "pdf" ]
	}
     ]
}