My export buttons are not showing up
My export buttons are not showing up
 ChrisF            
            
                Posts: 15Questions: 7Answers: 0
ChrisF            
            
                Posts: 15Questions: 7Answers: 0            
            I´ve been using DataTables for a while, recently I created a new table and copied my code from another table and customized that one, but I noticed in this my export buttons are not there and cant seem to find the core of the issue.
The code:
  <table id="usertable" style="margin-left: 20px; width: 98%;float:left; "   bgcolor="#02318e" >
            <thead>
            <tr>
                <th>Číslo výkresu</th>
                <th>Úkon</th>
                <th>Zamestnanec</th>
                <th>Poznámka</th>
                <th>Dátum sledovania</th>
                <th>Hodiny</th>
                <th>Minúty</th>
                <th>Sekundy</th>
            </tr>
            </thead>
            <tbody>
            </tbody>
        </table>
    <script type="text/javascript" src="https://code.jquery.com/jquery-1.11.3.min.js"></script>
    <script type="text/javascript" src="https://cdn.datatables.net/1.10.9/js/jquery.dataTables.min.js"></script>
    <script type="text/javascript" src="https://cdn.datatables.net/buttons/1.0.3/js/dataTables.buttons.min.js"></script>
    <script type="text/javascript" src="https://cdn.datatables.net/buttons/1.0.3/js/buttons.html5.min.js"></script>
    <script type="text/javascript" src="https://cdn.datatables.net/buttons/1.0.3/js/buttons.print.min.js"></script>
    <script type="text/javascript" src="https://cdn.datatables.net/buttons/1.0.3/js/buttons.flash.min.js"></script>
    <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jszip/2.5.0/jszip.min.js"></script>
    <script type="text/javascript" src="https://cdn.rawgit.com/bpampuch/pdfmake/0.1.18/build/pdfmake.min.js"></script>
    <script type="text/javascript" src="https://cdn.rawgit.com/bpampuch/pdfmake/0.1.18/build/vfs_fonts.js"></script>
    <script type="text/javascript">
        
        $(document).ready(function () {
            $('#usertable').DataTable({
                dom: 'Bflrtip',
                lengthMenu: [[10, 25, 50,100,200,300,400], [10, 25, 50,100,200,300,400]],
                buttons: [
                    'copy', 'csv', 'excel', 'pdf', 'print'
                ],
                "ajax": {
                  "url": "site/connecttoukony.php",
                    "data": {
                        "where": <?php echo $ID_ukon;?>
                    }
                },
                
                "serverSide": true,
                "order": [[ 0, "asc" ]],
                "columnDefs": [
                    {
                        "targets": 5,
                        "data": null,
                        "render": function (data, type, full, meta) {
                            return  parseInt(full[5]/60)
                        }
                    },
                    {
                        "targets": 6,
                        "data": null,
                        "render": function (data, type, full, meta) {
                            return  parseInt(full[5] % 60 + full[6] / 60)
                        }
                    },
                    {
                        "targets": 7,
                        "data": null,
                        "render": function (data, type, full, meta) {
                            return  parseInt(full[6]%60)
                        }
                    }
                ],
                stateSave: true,
                
                language: {
                    search: "Hľadať:",
                    info:"Zobrazujem _START_ do _END_ zo _TOTAL_ záznamov",
                    lengthMenu:     "Zobraziť _MENU_ záznamov",
                    infoEmpty:      "Zobrazujem 0 do 0 z 0 záznamov",
                    infoFiltered:   "(filtrované z _MAX_ celkových záznamov)",
                    zeroRecords:    "Neboli nájdené žiadne zodpovedajúce záznamy",
                    paginate: {
                        next:       "Ďaľšia",
                        previous:   "Predchádzajúca",
                    }
                }
            } );
        } );
        
    </script>
This discussion has been closed.
            
Answers
You are using a really old version of Buttons there (1.0.3). The current release is 1.5.4 - try that. If it doesn't work, give us a link to a page showing the issue and we'll take a look.
Allan
@allan Thank you for your response, I updated the button versions but still the same issue. The link to the page is the following:
http://appnormit.visibly.sk/index.php/ukon/casy/1
Nevermind my last post, I fixed it, thank you.