dom: "Bfrtip" gives unknown button type error
dom: "Bfrtip" gives unknown button type error
jonr
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
This discussion has been closed.
Answers
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
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
How are you defining your buttons?
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
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