Can't display the 'Show Entries' dropdown

Can't display the 'Show Entries' dropdown

PandalexPandalex Posts: 18Questions: 6Answers: 1
edited May 2021 in Free community support

Hi everyone,

I need your help to get the 'Show entries' dropdown.
It should be here by default per my understanging but I can"t get it displayed.

Unfortunately I can't give you a link to my page since it's hosted on a corporate network.

Thank you !

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
 <HEAD> 
    <meta http-equiv='Content-type' content='text/html; charset=UTF-8'> 
    <meta name='viewport' content='width=device-width,initial-scale=1,user-scalable=no'>
    <link rel='stylesheet' type='text/css' href='Formulaire.css'>
        <link rel='stylesheet' type='text/css' href='https://datatables.net/media/css/site-examples.css?_=0db1cd38700c0cfcdc140c39a2ebc306'>
    <link rel='stylesheet' type='text/css' href='https://cdn.datatables.net/1.10.21/css/jquery.dataTables.min.css'>
    <link rel='stylesheet' type='text/css' href='https://cdn.datatables.net/buttons/1.6.2/css/buttons.dataTables.min.css'>
    <link rel='alternate' type='application/rss+xml' title='RSS 2.0' href='http://www.datatables.net/rss.xml'>
    
    <script type='text/javascript' language='javascript' src='https://code.jquery.com/jquery-3.5.1.js'></script>
    <script type='text/javascript' language='javascript' src='https://cdn.datatables.net/1.10.21/js/jquery.dataTables.min.js'></script>
    <script type='text/javascript' language='javascript' src='https://cdn.datatables.net/buttons/1.6.2/js/dataTables.buttons.min.js'></script>
    <script type='text/javascript' language='javascript' src='https://cdn.datatables.net/buttons/1.6.2/js/buttons.flash.min.js'></script>
    <script type='text/javascript' language='javascript' src='https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js'></script>
    <script type='text/javascript' language='javascript' src='https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/pdfmake.min.js'></script>
    <script type='text/javascript' language='javascript' src='https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/vfs_fonts.js'></script>
    <script type='text/javascript' language='javascript' src='https://cdn.datatables.net/buttons/1.6.2/js/buttons.html5.min.js'></script>
    <script type='text/javascript' language='javascript' src='https://cdn.datatables.net/buttons/1.6.2/js/buttons.print.min.js'></script>
    <script type='text/javascript' language='javascript' src='https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.8.4/moment.min.js'></script>
    <script type='text/javascript' language='javascript' src='https://cdn.datatables.net/plug-ins/1.10.19/sorting/datetime-moment.js'></script>
    
    <script type='text/javascript' class='init'> $(document).ready(function() {  
        $.fn.dataTable.moment('DD/MM/YYYY');
        //$('#tab_type').DataTable( {
        $('table.display').DataTable( {
        dom: 'Bfrtip',
        paging: true,
        pageLength: 5,
        lengthChange: true,
        lengthMenu: [[10, 25, 50, -1], [10, 25, 50, "Tous"]],
        order: [[ 0, 'asc' ], [ 1, 'asc' ]], 
        buttons: ['copy', 'csv', 'excel', 'pdf', 'print'],
        language: {'url': 'https://cdn.datatables.net/plug-ins/a5734b29083/i18n/French.json' } 
         } ); 
     } ); 
    </script>
      
    <script language="javascript">
    function editRecordType(colonne, idValeur){         
        window.location.href="configTypeServlet/"+colonne+"/"+idValeur; 
      }
      function deleteRecordType(colonne, idValeur){    
        window.location.href="deleteConfigType/"+colonne+"/"+idValeur; 
      }
      
      function editRecordSousType(colonne, idValeur, idSousType){      
        window.location.href="configSousTypeServlet/"+colonne+"/"+idValeur+"/"+idSousType; 
      }
      function deleteRecordSousType(colonne, idValeur, idSousType){    
        window.location.href="deleteConfigSousType/"+colonne+"/"+idValeur+"/"+idSousType; 
      }
    </script>
</HEAD><BODY>
 
    <br/>
    <div id='exForm'><titre>Configuration des colonnes</titre></div>
    <br/>
    <div style="padding-left:225px ;">  
        <a href="addConfigType.jsp" style="text-decoration: underline;color:#cc0000;">Ajouter une configuration de colonne</a>
    </div>  
    <br/>
    <table id='' class='display' style='width:100%'  style="padding: 0px 10px;" >
        <thead>
            <tr><th>Colonne</th><th>Id Valeur</th><th>Libellé</th><th></th><th></th>
            </tr>
        </thead>
        <tbody>     
                    <tr>
                        <td>cause</td>
                        <td>1</td>
                        <td>Naturelles</td>
                        <td><input type="button" name="edit" value="Modifier" onclick="editRecordType('cause', 1);" class="buttonGreen"></td>
                    
                                <td>Configuration active</td>                           
                </tr>
                    <tr>
                        <td>cause</td>
                        <td>2</td>
                        <td>Noyade</td>
                        <td><input type="button" name="edit" value="Modifier" onclick="editRecordType('cause', 2);" class="buttonGreen"></td>
                    
                                <td>Configuration active</td>                           
                </tr>
                    <tr>
                        <td>cause</td>
                        <td>3</td>
                        <td>Chutage</td>
                        <td><input type="button" name="edit" value="Modifier" onclick="editRecordType('cause', 3);" class="buttonGreen"></td>
                    
                            <td><input type="button" name="delete" value="Supprimer" onclick="deleteRecordType('cause', 3);" class="buttonRed"></td>
                        
                    </tr>
                    <tr>
                        <td>medecin</td>
                        <td>1</td>
                        <td>Emma</td>
                        <td><input type="button" name="edit" value="Modifier" onclick="editRecordType('medecin', 1);" class="buttonGreen"></td>
                    
                                <td>Configuration active</td>                           
                </tr>
                    <tr>
                        <td>medecin</td>
                        <td>2</td>
                        <td>Sebastien</td>
                        <td><input type="button" name="edit" value="Modifier" onclick="editRecordType('medecin', 2);" class="buttonGreen"></td>
                    
                                <td>Configuration active</td>                           
                </tr>
                    <tr>
                        <td>medecin</td>
                        <td>3</td>
                        <td>house</td>
                        <td><input type="button" name="edit" value="Modifier" onclick="editRecordType('medecin', 3);" class="buttonGreen"></td>
                    
                            <td><input type="button" name="delete" value="Supprimer" onclick="deleteRecordType('medecin', 3);" class="buttonRed"></td>
                        
                    </tr>
                    <tr>
                        <td>medecin</td>
                        <td>4</td>
                        <td>Bruno</td>
                        <td><input type="button" name="edit" value="Modifier" onclick="editRecordType('medecin', 4);" class="buttonGreen"></td>
                    
                            <td><input type="button" name="delete" value="Supprimer" onclick="deleteRecordType('medecin', 4);" class="buttonRed"></td>
                        
                    </tr>
                    <tr>
                        <td>typeExamen</td>
                        <td>1</td>
                        <td>Ex corps</td>
                        <td><input type="button" name="edit" value="Modifier" onclick="editRecordType('typeExamen', 1);" class="buttonGreen"></td>
                                            <td>Configuration active</td>   
                </tr>
                    <tr>
                        <td>typeExamen</td>
                        <td>2</td>
                        <td>Autopsie</td>
                        <td><input type="button" name="edit" value="Modifier" onclick="editRecordType('typeExamen', 2);" class="buttonGreen"></td>
                            <td>Configuration active</td>                           
                </tr>
                
        </tbody>
    </table>    
    
    </br></br>
    <div id='exForm'><titre>Configuration des sous-colonnes</titre></div>   <br/>
    <table id='' class='display' style='width:100%'  style="padding: 0px 10px;" >
        <thead>
            <tr><th>Colonne</th><th>Id Valeur</th><th>Libellé</th><th>Sous Type</th><th>Id Sous Type</th><th></th><th></th>
            </tr>
        </thead>
        <tbody>     
                    <tr>
                        <td>cause</td>
                        <td>1</td>
                        <td>
                            Naturelles
                    </td>
                        <td>Cardiaque</td>                  <td>2</td>
                        <td><input type="button" name="edit" value="Modifier" onclick="editRecordSousType('cause', 1, 2);" class="buttonGreen"></td>
                        <td><input type="button" name="delete" value="Supprimer" onclick="deleteRecordSousType('cause', 1, 2);" class="buttonRed"></td>
                    </tr>
                    <tr>
                        <td>cause</td>
                        <td>2</td>
                        <td>
                            Noyade
                    </td>
                        <td>Eau douce</td>                  <td>1</td>
                        <td><input type="button" name="edit" value="Modifier" onclick="editRecordSousType('cause', 2, 1);" class="buttonGreen"></td>
                        <td><input type="button" name="delete" value="Supprimer" onclick="deleteRecordSousType('cause', 2, 1);" class="buttonRed"></td>
                    </tr>               
        </tbody>
    </table>      
 </BODY>
</HTML>

This question has accepted answers - jump to:

Answers

  • tangerinetangerine Posts: 3,350Questions: 37Answers: 394
    Answer ✓
  • PandalexPandalex Posts: 18Questions: 6Answers: 1

    That was efficient !
    Thanks, I couln't find this topic myself.

    I paste the answer to save a click.
    Could you explain what was the issue ?

    FIX: changed dom: 'Bfrtip', ** to dom: 'B<"clear">lfrtip',**

  • tangerinetangerine Posts: 3,350Questions: 37Answers: 394
    Answer ✓

    Each letter in the "dom" represents a DataTables feature. You were missing the "l" for pageLength.
    You might not need the "clear" - that's not the issue here.

  • PandalexPandalex Posts: 18Questions: 6Answers: 1

    I get it now, thanks a lot it was super helpful !
    Now that I understant what it means I found the documentation.
    I post it in case someone needs it :smile:

    https://datatables.net/reference/option/dom

This discussion has been closed.