Can't get Buttons extension to work

Can't get Buttons extension to work

BenkaiDebussyBenkaiDebussy Posts: 5Questions: 2Answers: 0
edited August 2015 in Free community support

I'm trying to use the Buttons extension to add copy/excel export functionality to my table (after noticing that TableTools has apparently been retired). After using the same syntax as the example it still doesn't seem to be working.

Here is the debug: http://debug.datatables.net/oyudep

And here is a link to the table in question: http://gn2_zach.genenetwork.org/search?species=mouse&group=BXD&type=Hippocampus+mRNA&dataset=HC_M2_0606_P&search_terms_or=shh&search_terms_and=&FormID=searchResult

At first I thought that maybe it wasn't interacting well with colResize or colReorder, but even after I removed those options the buttons still didn't appear.

By the way, your link to the Buttons css import also doesn't seem to work (at https://cdn.datatables.net/buttons/1.0.0/css/dataTables.buttons.min.css ).

Thanks!

Replies

  • allanallan Posts: 63,696Questions: 1Answers: 10,500 Site admin

    Hi,

    Thanks for the link! The copy and excel buttons are working on your page as the HTML5 export module for Buttons hasn't been loaded on your page. The file you want is this one. You must also include JSZip for the Excel button to work.

    You've got quite a few DataTables includes files on your page - you could try using the Downloader to build a suitable package. That will also include all the required scripts and styles to use Bootstrap if you want (since you appear to have Bootstrap on the page).

    The CDN link should be https://cdn.datatables.net/buttons/1.0.0/css/buttons.dataTables.min.css . Could you let me know where you could the dataTables.buttons.min.css link and I'll get that sorted? A hiccup in the recent deploy I suspect!

    Thanks,
    Allan

  • BenkaiDebussyBenkaiDebussy Posts: 5Questions: 2Answers: 0

    I found the CDN link under Buttons here: https://www.datatables.net/download/release

    Including the files you mentioned seems to have fixed the issue, thanks! I'll also go ahead and use the Downloader once we're sure which extensions we want to include; we've been experimenting with different ones later.

  • allanallan Posts: 63,696Questions: 1Answers: 10,500 Site admin

    Awesome - thanks. It looks like there are actually a few mistakes on that page... I'll get that sorted out!

    Allan

  • ViniciusMachadoViniciusMachado Posts: 10Questions: 1Answers: 0

    I can't get Copy button to work. When I click it, it display the message that goes away as soon as I click CTRL + C. But when I try to paste there is nothing copied. Any help?

  • allanallan Posts: 63,696Questions: 1Answers: 10,500 Site admin

    Thanks - I've just replied in your other thread on this. Can you please note post the same question multiple times.

    Allan

This discussion has been closed.