dom: "Bfrtip" gives unknown button type error

dom: "Bfrtip" gives unknown button type error

jonrjonr Posts: 51Questions: 5Answers: 0

Apparently TableTools is now obsolete and replaced by buttons and select.

However, I have these loaded thus:

<script type="text/javascript" src="https://cdn.datatables.net/buttons/1.3.1/js/dataTables.buttons.js"></script>
<script type="text/javascript" src="https://cdn.datatables.net/select/1.2.2/js/dataTables.select.js"></script>

but am still getting the error as per the subject of this message.

jON

Answers

  • kthorngrenkthorngren Posts: 21,141Questions: 26Answers: 4,918

    Which buttons are you trying to load. Typically when the buttons to appear all the required JS files are not included. This page lists the required JS files needed for each button:
    https://datatables.net/download/release#Buttons

    Kevin

  • jonrjonr Posts: 51Questions: 5Answers: 0

    I am just expecting some buttons to appear and currently I get none even though I have loaded all js and css as per the examples.

    I will not want them all but so far I can't see any at all because I get a javascript error.

    jON

  • tangerinetangerine Posts: 3,365Questions: 39Answers: 395

    How are you defining your buttons?

  • kthorngrenkthorngren Posts: 21,141Questions: 26Answers: 4,918

    The two lines above are not enough. Depending on which buttons you want and the type (flash, html5) you need to load additional JS. You can also look at the examples to see which files need to be loaded:

    https://datatables.net/extensions/buttons/examples/

    If this doesn't help please post your datatables init code so we can see which buttons you are trying to load.

    Kevin

  • allanallan Posts: 63,160Questions: 1Answers: 10,406 Site admin

    Yup - if you load just Buttons core you only get the basic framework. It didn't make sense to always include all buttons. Many won't want the massive file required for creating PDF output for example. The download builder is absolutely the way to go here to make sure you get the files required for the export buttons you want.

    Allan

This discussion has been closed.