Buttons

Buttons

JamieTJamieT Posts: 2Questions: 1Answers: 1

Hello. I hope this is an easy one but it is driving me nuts.
I have a table getting data from a URL to MySql.
This works fine and has a dropdown for number of records per page.

All I want to do is add some export buttons.
When I add buttons they do not show up and I lose the dropdown.
When I remove the URL parameters the buttons show up and work.

An help please?


<script type="text/javascript" language="javascript" > $(document).ready(function() { var table = $('#example').DataTable( { "processing": true, "serverSide": true, "ajax":{ url :"employee-grid-data.php", // json datasource type: "post", // method , by default get error: function(){ // error handling $(".example-error").html(""); $("#example").append('<tbody class="example-error"><tr><th colspan="3">No data found in the server</th></tr></tbody>'); $("#example_processing").css("display","none"); } }, "lengthChange": false, "buttons": [ 'copy', 'excel', 'pdf', 'colvis' ] } ); table.buttons().container() .insertAfter( '#example' ); } ); </script>

This question has an accepted answers - jump to answer

Answers

This discussion has been closed.