How to use the CDN Datatables with the cdn Table tools? Setting sSwfPath?

How to use the CDN Datatables with the cdn Table tools? Setting sSwfPath?

radi8radi8 Posts: 31Questions: 6Answers: 0
edited April 2013 in General
I have been trying to get this to work. Currently, I am getting the datatables JS from the MS Ajax CDN and also getting the table tools from http://datatables.net/download/build/TableTools.min.js . When I try to use the Table Tools to get the Export to Excel and Print buttons (or any buttons), they do not render at all. All I get is a string of text at the top of the page. This leads me to think that there is an issue with the sSwfPath.

Here is my script tags:
[code]


[/code]

Here is the datatables initialization:

[code]
var oTable = $('#detailed_data').dataTable( {
"iDisplayLength": 20,
"sSearch": "Search all columns:",
"sPaginationType": "full_numbers",
"bFilter": false,
"sScrollXInner": "110%",
"sDom": 'T<"clear">lfrtip',
"oTableTools": {
"sSwfPath": "http://datatables.net/download/build/TableTools.min.js/media/swf/copy_csv_xls_pdf.swf"
}
});
[/code]
(FYI: this is also being plugged into a JQuery Dialog to be displayed as a "popup").
With this last configuration, the menu option at the top is NOT displaying and the page row limit does not work (shows all rows).
This site is an internal corporate site so I cannot supply a link. I will try to get some data into a fiddle soon if necessary.
Any help is appreciated.

Replies

  • radi8radi8 Posts: 31Questions: 6Answers: 0
    FireBug is reporting a problem with the ZeroClipBoard JS. I read somewhere that the TableTools.min.js defined the ZeroClipboard correctly. Obviously not, so how do I reference it?
  • allanallan Posts: 61,864Questions: 1Answers: 10,136 Site admin
    datatables.net is not a CDN server and should not be used as such. It is not designed to be, and I might add throttling for hotlinking in future as a huge amount of bandwidth is being used and causing unnecessary load. You'll get much better performance from using a proper CDN or even a locally hosted file.

    Regarding the specific issue, likely it is because you are using scripts and files from multiple sources and the browser (and Flash) are blocking it as a security risk.

    Allan
  • radi8radi8 Posts: 31Questions: 6Answers: 0
    edited April 2013
    I understand the table tools CDN thing albiet the Table Tools does not have a CDN (that I have found). I have changed the sources, but I had read in another post where that url was being used. I am now using a local copy of the Table Tools. BUT, I am still getting the string of text at the top of the table which does nothing EXCEPT show the print view. Viewing the HTML, I can follow the links to the Table Tools JS and also the Zero Clip Board JS so those files are valid.

    I tested FLASH (from http://helpx.adobe.com/flash-player/kb/find-version-flash-player.html) on my browser(s) and they are all working properly. Does this verify the security portion?

    I will look into the security piece, but am not sure this is the issue.
  • allanallan Posts: 61,864Questions: 1Answers: 10,136 Site admin
    You'd need to link us to the page that you are working on so we could see what is going wrong.

    Allan
This discussion has been closed.