buttons extension
buttons extension
jnylund
Posts: 10Questions: 3Answers: 0
HI, I am trying to get a basic working example of this, followed the directions and no luck.
http://jsfiddle.net/xdpb0soj/6/
What am I doing wrong?
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Check your js loading order - i.e. datatables itself before any of its extensions.
I tried messing with order before, no luck,
http://jsfiddle.net/xdpb0soj/7/
I think you need to add editor to see these buttons.
I dont see anything in the docs about requiring editor for buttons to work, but I tried, still no luck:
http://jsfiddle.net/xdpb0soj/9/
Can you please give a link to this base example.
No, Editor is absolutely not required in order to use Buttons.
Thanks for the links to the JSFiddles - there are a couple of issues:
I would suggest using the download builder which will take care of both for you. If you want to load individual files, it also has an option for that.
Regards,
Allan
Hi, I fixed the order and added export buttons html5, and I only get copy, not the other 2 links. Does csv/excel require flash?
I added flash, that didn't help.
You will have to show your code, or preferably provide a link to a page showing your problem.
Sorry I thought I did, here is the latest fiddle - http://jsfiddle.net/p14p00c5/4/
Console shows error: TypeError: $.fn.dataTable.Editor is not a constructor
You are trying to use the Editor, but you haven't included it.
I've never had much luck including Flash components on JSFiddle. The HTML5 exports aren't working because the required libraries (JSZip and makepdf) aren't being included. The copy button defaults to Flash if the Flash button is available.
Allan
Hi Allan, thanks for all the help, I love datatables, and you have always been super helpful. Is there a working example with the new version and csv anywhere in the world? I cant find it. I cant see why including zip library will make csvs work, but I have tried and it still doesn't work.
Here is another try:
http://jsfiddle.net/p14p00c5/9/
http://jsfiddle.net/p14p00c5/11/
I've removed the Flash buttons (as I said, i've never been able to get them working in JSFiddle). And I added the HTML 5 buttons and a CSV button output.
The PDF button isn't working as the font library that makepdf requires in't being loaded, but copy, csv and excel are.
Allan
Thanks,t hat works!