Error type mData

Error type mData

KeoughKeough Posts: 10Questions: 1Answers: 0

Hello i have a problem with Datatables i try to link my code but is it impossible
i have this error

Uncaught TypeError: Cannot read property 'mData' of undefined
at HTMLTableCellElement.<anonymous> (jquery.dataTables.min.js:89)
at Function.each (jquery.js:354)
at jQuery.fn.init.each (jquery.js:189)
at HTMLTableElement.<anonymous> (jquery.dataTables.min.js:89)
at Function.each (jquery.js:354)
at jQuery.fn.init.each (jquery.js:189)
at jQuery.fn.init.m [as dataTable] (jquery.dataTables.min.js:82)
at jQuery.fn.init.h.fn.DataTable (jquery.dataTables.min.js:164)
at HTMLDocument.<anonymous> (info_bdd:252)
at mightThrow (jquery.js:3534)
``
sorry is impossible to link my code i have error "Body is 15116 characters too long."

i don't understand why function a datatable forum... my code is very long

Replies

  • KeoughKeough Posts: 10Questions: 1Answers: 0

    my js first part

    <script type="text/javascript">
    
        $(document).ready(( function () {
    
        var table = $('#suivi1').DataTable({
          // On indique qu'on veut un traitement côté serveur
            "processing": true,
            "serverSide": true,
            // On charge les données à partir d'une source Ajax
            ajax : "<?php echo site_url('User/info_bdd') ?>",
    
                "type": "POST",
               
                columns : [
    
                       {"data" : "N"}, // 1
                       {"data" : "Nom_du_projet"}, // 2
                       {"data" : "DAS"},// 3
                       {"data" : "Cat_de_projet"}, // 4
                       {"data" : "Th_me"}, // 5
                       {"data" : "P_le_Leader"}, // 6
                       {"data" : "Porteur"},// 7
                       {"data" : "College_Porteur"}, // 8
                       {"data" : "Description"}, // 9
                       {"data" : "Descriptif_D_taill"}, // 10
                       {"data" : "Partenaires"}, // 11
                       {"data" : "Date_de_d_marrage"},// 12
                       {"data" : "Date_de_fin_init"}, // 13
                       {"data" : "Dur_e_init_mois"}, // 14
                       {"data" : "Co_t_total_k"}, // 15
                       {"data" : "Aide_totale_obtenue_K"}, // 16
                       {"data" : "Ann_e_de_Financement"},// 17
                       {"data" : "Type_de_Projet_ComLab"},// 18
                       {"data" : "Financement"},// 19
                       {"data" : "Type_de_Financement"},// 20
                       {"data" : "Priorit_AV"},// 21
                       {"data" : "Priorit_DGE"},// 22
                       {"data" : "Priorit_Globale"},// 23
                       {"data" : "Nb_Infos"},// 24
                       {"data" : "Synth_se"},// 25
                       {"data" : "Date_MaJ_info_Projet"},// 26
                       {"data" : "Statut_Projet"},// 27
                       {"data" : "AnneeFin_Projet"},// 28
                       {"data" : "Niveau_TRL_D_but"},// 29
                       {"data" : "Niveau_TRL_Fin"},// 30
                       {"data" : "Projet_Amont"},// 31
                       {"data" : "Projet_Aval"},// 32
                       {"data" : "D_tails_Poursuite_Pjt"},// 33
                       {"data" : "A_AERONAUTIQUE"},// 34
                       {"data" : "E_ESPACE"},// 35
                       {"data" : "S_SYST_EMBARQUES"},// 36
                       {"data" : "D_APPLI_HORS_AEROSPATIAL"}, // 37
                       {"data" : "date_effective_de_d_but_des_travaux_de_R_D_JJ_MM_AAAA"},// 38
                       {"data" : "date_effective_de_fin_des_travaux_de_R_D_JJ_MM_AAAA"},// 39
                       {"data" : "succ_s_technologique_du_projet"},// 40
                       {"data" : "CommentairesSucc_sTechno"},// 41
                       {"data" : "es_chercheurs_d_organismes_de_recherche_impliqu_s_dans_le_projet"},//42
                       {"data" : "es_chercheurs_ing_nieurs_d_entreprises_impliqu_s_dans_le_projet"},//43
                       {"data" : "nombre_de_nouveaux_proc_d_s_cr_s_dans_le_cadre_du_projet"},//44
                       {"data" : "nombre_de_nouveaux_produits_d_velopp_s_dans_le_cadre_du_projet"},//45
                       {"data" : "nombre_de_nouveaux_services_issus_du_projet"},//46
                       {"data" : "emplois_cr_s_pendant_la_r_alisation_du_projet"},//47
                       {"data" : "emplois_maintenus_pendant_la_r_alisation_du_projet"},//48
                       {"data" : "d_penses_r_elles_des_organismes_de_recherche_pendant_le_projet"},//49
                       {"data" : "d_penses_r_elles_des_entreprises_pendant_le_projet"},//50
                       {"data" : "succ_s_commercial"},//51
                       {"data" : "D_tails_Non_Succ_s_Commercial"},//52
                       {"data" : "nombre_cumul_de_produits_mis_sur_le_march"},//53
                       {"data" : "nombre_cumul_s_de_proc_d_s_mis_sur_le_march"},//54
                       {"data" : "nombre_cumul_s_de_services_mis_sur_le_march"},//55
                       {"data" : "Chiffre_d_affaires_g_n_r_depuis_le_lancement_sur_le_march"},//56
                       {"data" : "Date_Debut_G_n_ration_CA"},//57
                       {"data" : "nombre_cumul_d_emplois_cr_s_1_an_apr_s_la_fin_du_projet_en_ETP"},//58
                       {"data" : "cumul_d_emplois_maintenus_1_an_apr_s_la_fin_du_projet_en_ETP"},//59
                       {"data" : "obligatoirement_compris_entre_N_3_et_N_7_apr_s_la_fin_du_projet"},//60
                       {"data" : "nombre_cumul_d_emplois_cr_s_X_ans_apr_s_la_fin_du_projet_en_ETP"},//61
                       {"data" : "cumul_d_emplois_maintenus_X_ans_apr_s_la_fin_du_projet_en_ETP"},//62
                       {"data" : "nombre_cumul_de_brevets_d_pos_s_X_ans_et_plus"},//63
                       {"data" : "d_autres_titres_de_propri_t_intellectuelle_d_pos_s_X_ans_et_plus"},//64
                       {"data" : "Commentaires_Droits_de_PI"},//65
                       {"data" : "nombre_cumul_d_articles_scientifiques_publi_s"},//66
                       {"data" : "Publications_Internationnales"},//67
                       {"data" : "nombre_cumul_de_cr_ations_d_entreprises_suite_au_projet"},//68
                       {"data" : "Briques_Technologiques_Amelioration_MethodesIndus"},//69
                       {"data" : "Cr_ation_de_partenariat"},//70
                       {"data" : "Produits"},//71
                       {"data" : "Commentaires_Retomb_s_du_projet"},//72
                       {"data" : "remarques1"},//73
                       {"data" : "Cat_gories_des_R_sultats"},//74
                       {"data" : "March_vis_Aero_Espace_Sant_Agro_Agri_Transport_terrestre"},//75
                       {"data" : "Blian"},//76
                       {"data" : "REX"},//77
                       {"data" : "Remarques_Internes"},//78
                       {"data" : "Accord_de_Consortium"},//79
                       {"data" : "Demande_d_accompagnement"},//80
                       {"data" : "r_alis_s_Poster_Vid_o_CP_Rapport_Activit_RA_Avion_du_Futur_ADF"},//81
                       {"data" : "le_projet_a_t_pr_sent_TechnDay_TD_Forum_Tehcnique_Arcachon_FTA"},//82
                       {"data" : "R_f_rent_au_pole_AV"},//83
                       {"data" : "Remaques_Sur_Contact"},//84
                       {"data" : "Type_Port_Part_Lab_Indus"},//85
                       {"data" : "Date_Validit"},//86
                       {"data" : "Nom"},//87
                       {"data" : "Email"},//88
                       {"data" : "Anciens_Mail_Non_Valide"},//89
                       {"data" : "Tel"},//90
                       {"data" : "P_rim_tre_DGE"},//91
                       {"data" : "Type_Questionnaire"},//92
                       {"data" : "Retours_Y_X"},//93
                       {"data" : "S_lectionn_DGE_Y_2"},//94
                       {"data" : "S_lectionn_DGE_Y_1"},//95
                       {"data" : "S_lectionn_DGE_Y"},//96
                       {"data" : "Etat_Retour_Y_1"},//97
                       {"data" : "Etat_Retour_Y"},//98
                       {"data" : "Remarques2"},//99
                       {"data" : "A_Faire"},//100
    
    
    
            
    
  • KeoughKeough Posts: 10Questions: 1Answers: 0

    my part two

        ],
          // on défini l'ordre
            "order": [[1,'asc']],
    
    
            initComplete: function () {
              this.api().columns([2,3,4,5,6,7,8]).every( function () {
                var column = this;
                var select = $('<select class="customFilters"><option value=""></option></select>')
                .appendTo( $(column.footer()).empty() )
                .on( 'change', function () {
                  var val = $.fn.dataTable.util.escapeRegex(
                    $(this).val()
                  );
    
                  column
                  .search( val ? '^'+val+'$' : '', true, false )
                  .draw();
                } );
    
                column.data().unique().sort().each( function ( d, j ) {
                  select.append( '<option class="customFilters" value="'+d+'">'+d+'</option>' )
                } );
              } );
            },
    
            'scrollCollapse': true,
    
    
            'columnDefs': [
    
              {'targets':[9,10,11], render: function ( data, type, row ) {return data.substr( 0, 10 );}},
              {'targets': 0,'checkboxes': {'selectRow': true},'orderable': false},
              // {'targets': 2,'width':'250px'},
    
          ],
    
    
          dom: 'Bfrtip',
    
    
    
          lengthMenu: [
            [14],
    
    
          ],
    
    
    
          buttons: [
            {
              extend: 'colvis',
              columns: ':gt(0)'
            },
            'csvHtml5',
            'excelHtml5'
          ],
          "language": {
            "lengthMenu": "Afficher _MENU_ enregistrements par page",
            "zeroRecords": "Aucun résultats",
            "info": "Page numéro _PAGE_ sur _PAGES_",
            "infoEmpty": "Aucun enregistrement disponible",
            "infoFiltered": "(filtrés à partir de _MAX_ enregistrements totaux)",
            "decimal":        "",
            "emptyTable":     "Pas de données dans la table d'enregistrement",
            "infoPostFix":    "",
            "thousands":      ",",
            "loadingRecords": "Chargement...",
            "processing":     "En cours",
            "search":         "Rechercher:",
            "paginate": {
              "first":      "Premiere",
              "last":       "Dernière",
              "next":       "Suivante",
              "previous":   "Précédente"
            },
            "pagingType": "full_number",
            "aria": {
              "sortAscending":  ": Trier dans l'ordre croissant",
              "sortDescending": ": Trier dans l'ordre décroissant"
            }
          },
    
          'select': {
            style:    'multi',
          },
    
          "scrollX": true,
          'fixedColumns': {
                'leftColumns': 3
            },
    
        });
    
    
        $('#input-excel').change(function(e){
    
          var reader = new FileReader();
          reader.readAsArrayBuffer(e.target.files[0]);
          reader.onload = function(e) {
            var data = new Uint8Array(reader.result);
            var wb = XLSX.read(data,{type:'array',codepage:1252});
            var first_sheet_name = wb.SheetNames[0];
            var worksheet = wb.Sheets['TAB PLANNING & FI'];
            var tableToCompare = XLSX.utils.sheet_to_json(worksheet);
            console.log(tableToCompare);
            // var htmlstr = XLSX.write(wb,{sheet:"TAB PLANNING & FI", type:'string',bookType:'html'});
            // $('#renderer')[0].innerHTML += htmlstr;
          }
        });
    
    
    
        //Handle form submission event
        $('#wrapper').on('submit', function(e){
          var form = this;
          var rowsel = table.column(0).checkboxes.selected();
          // Iterate over all selected checkboxes
          $.each(rowsel, function(index, rowId){
            // Create a hidden element
            $(form).append(
              $('<input>')
              .attr('type', 'hidden')
              .attr('name', 'id[]')
              .val(rowId)
            );
          });
          //$("#suivi1").text(rowsel.join(",")) //inutile
          //  $("#suivi1").text($(form).serialize()) //inutile
          $('input[name="id\[\]"]', form).remove()
          e.preventDefault()
        });
    
    
          $('#clearf').click(function(){
            $('#suivi1').search( '' ).columns().search( '' ).draw();
            // table.draw();
          });
    
    
        }));
        </script>
    
  • KeoughKeough Posts: 10Questions: 1Answers: 0

    my html first part

    <!DOCTYPE html>
    <html>
      <head>
        <meta charset="utf-8">
        <title></title>
        <!-- Appel des fichiers CSS et DataTable -->
    
        <link rel="stylesheet" type="text/css" href="<?php echo bcss_url("bootstrap.min"); ?>">
        <link rel="stylesheet" type="text/css" href="<?php echo css_url("suiviProjet"); ?>">
        <link rel="stylesheet" type="text/css" href="<?php echo css_url("buttons.dataTables.min"); ?>">
        <link rel="stylesheet" type="text/css" href="<?php echo css_url("datatables.min"); ?>">
        <link rel="stylesheet" type="text/css" href="<?php echo css_url("dataTables.bootstrap4.min"); ?>">
        <link rel="stylesheet" type="text/css" href="<?php echo css_url("jquery.dataTables.min"); ?>">
        <link rel="stylesheet" type="text/css" href="<?php echo css_url("dataTables.checkboxes"); ?>">
    
        <!-- Appel des differents Script -->
        <script type="text/javascript" src="<?php echo js_url("jquery");?>"></script>
        <script type="text/javascript" src="<?php echo bjs_url("bootstrap.min");?>"></script>
    
        <script type="text/javascript" src="<?php echo js_url("datatables.min");?>"></script>
        <script type="text/javascript" src="<?php echo js_url("jquery.dataTables.min");?>"></script>
        <script type="text/javascript" src="<?php echo js_url("dataTables.buttons.min");?>"></script>
        <script type="text/javascript" src="<?php echo js_url("jszip.min");?>"></script>
        <script type="text/javascript" src="<?php echo js_url("buttons.html5.min");?>"></script>
        <script type="text/javascript" src="<?php echo js_url("buttons.colVis.min");?>"></script>
        <script type="text/javascript" src="<?php echo js_url("dataTables.checkboxes.min");?>"></script>
        <script type="text/javascript" src="<?php echo js_url("xlsx.full.min");?>"></script>
    
      </head>
      <body>
    
        <table id='suivi1' class='table table-striped table-bordered' >
        <thead>
        <tr>
        <th></th><!-- 0-->
        <th class='orange'>N°</th><!-- 1-->
        <th class='orange'>Nom projet</th><!-- 2-->
        <th class='orange'>DAS</th><!-- 3-->
        <th class='orange'>Cat.</th><!-- 4-->
        <th class='orange'>Thème</th><!-- 5-->
        <th class='orange'>Pôle leader</th><!-- 6-->
        <th class='orange'>Porteur</th><!-- 7-->
        <th class='orange'>Collège</th><!-- 8-->
        <th class='green'>Description</th><!-- 9-->
        <th class='green'>Description détaillée</th><!-- 10-->
        <th class='green'>partenaires</th><!-- 11-->
         <th class='orange'>Date de début</th><!-- 12-->
         <th class='orange'>Date de fin init</th><!-- 13-->
         <th class='orange'>Duree init mois</th><!-- 14-->
         <th class='orange'>Cout total</th><!-- 15-->
         <th class='orange'>Aide totale obtenue</th><!-- 16-->
         <th class='orange'>Année de financement</th><!-- 17-->
         <th class='orange'>type de projet ComLab</th><!-- 18-->
         <th class='orange'>financement</th><!-- 19-->
         <th class='orange'>Type de financement</th><!-- 20-->
         <th class='red'>Priorité AV</th><!-- 21-->
         <th class='red'>priorite DGE</th><!--22 -->
         <th class='red'>priorite Globale</th><!-- 23-->
         <th class='lightblue'>Nb Infos</th><!-- 24-->
         <th class='lightblue'>Synth se</th><!-- 25-->
         <th class='lightblue'>Date MaJ info projet</th><!-- 26-->
         <th class='lightblue'>Statut Projet</th><!-- 27-->
         <th class='lightblue'>Annee fin_projet</th><!-- 28-->
         <th class='white'>Niveau TLR debut</th><!-- 29-->
         <th class='white'>niveau TLR fin</th><!-- 30-->
         <th class='white'>Projet Amont</th><!-- 31-->
         <th class='white'>Projet Aval</th><!-- 32-->
         <th class='white'>Details poursuite projet</th><!-- 33-->
         <th class='white'>Aeronautique</th><!-- 34-->
         <th class='white'>Espace</th><!-- 35-->
         <th class='white'>Systeme embarques</th><!-- 36-->
         <th class='white'>App hors aerospatial</th><!-- 37-->
         <th class='greenLight'>date effective debut travaux R&D</th><!-- 38-->
         <th class='greenLight'>date effective fin travaux R&D</th><!-- 39-->
         <th class='greenLight'>succes technologique du projet</th><!-- 40-->
         <th class='greenLight'>commentaire du succes technologique</th><!-- 41-->
         <th class='greenLight'>organisme de recherche impliquer dans le projet</th><!-- 42-->
         <th class='greenLight'>chercheur et entrpeirses impliquer dans le projet</th><!-- 43-->
         <th class='greenLight'>nouveau procédé dans le projet</th><!-- 44-->
         <th class='greenLight'>nombre de produit developper dans le projet</th><!-- 45-->
         <th class='greenLight'>nombre de services developper dans le projet</th><!--46 -->
         <th class='greenLight'>emplois crées pendant le projet</th><!--47 -->
         <th class='greenLight'>emplois maintenus pendant le projet</th><!-- 48-->
         <th class='greenLight'>depenses réelle des organismes de recherches durant le projet</th><!--49 -->
         <th class='greenLight'>depenses réelles des entreprises pendant le projet</th><!-- 50-->
         <th class='greenLight'>succes commercial</th><!-- 51-->
         <th class='greenLight'>detail du non succes commercial</th><!-- 52-->
         <th class='greenLight'>nombre de produits sur le marché</th><!-- 53-->
         <th class='greenLight'>nombre de procédés mis sur le marché</th><!-- 54-->
         <th class='greenLight'>nombres de services mis sur la marché</th><!-- 55-->
         <th class='greenLight'>chiffre d'affaire généré depuis le lancement sur le marché</th><!-- 56-->
         <th class='greenLight'>Date de debut génération_CA</th><!-- 57-->
         <th class='greenLight'>Nombres d'emplois crée 1an apres la fin du projet</th><!--58 -->
         <th class='greenLight'>emplois maintenanus 1 an apres la fin du projet en ETP</th><!-- 59-->
         <th class='greenLight'>n+3 et n+7 apres la fin du projet</th><!-- 60-->
         <th class='greenLight'>nombre d'emplois crées apres la fin du projet en ETP</th><!-- 61-->
         <th class='greenLight'>emplois maintenanu apres la fin du projet en ETP</th><!-- 62-->
         <th class='greenLight'>nombres brevet déposé</th><!-- 63-->
         <th class='greenLight'>autre titre de propriété intellectuelle déposé</th><!-- 64-->
         <th class='greenLight'>commentaires droits de PI</th><!-- 65-->
         <th class='greenLight'>nombre d'article scientifiques publiés</th><!-- 66-->
         <th class='greenLight'>publications internationales</th><!-- 67-->
         <th class='greenLight'>nombre  de création d'entreprise suite au projet</th><!--68 -->
         <th class='greenLight'>briques technologiques amelioration Methodes Indus</th><!--69 -->
         <th class='greenLight'>Création de partenariat</th><!-- 70-->
         <th class='greenLight'>produits</th><!-- 71-->
         <th class='greenLight'>Commentaires sur le projet</th><!-- 72-->
         <th class='greenLight'>remarques 1</th><!-- 73-->
         <th class='white'>Catégories des resultats</th><!-- 74-->
         <th class='white'>Aerospace santé agro agri transport terrestre</th><!--75 -->
         <th class='white'>bilan</th><!-- 76-->
         <th class='white'>REX</th><!-- 77-->
         <th class='white'>Remarques internes</th><!-- 78-->
         <th class='white'>Accord de consortium</th><!-- 79-->
         <th class='white'>demande d'accompagnement</th><!-- 80-->
         <th class='white'>rapport activité RA avion du future ADF</th><!-- 81-->
         <th class='white'>Technique Arcachon_FTA</th><!-- 82-->
         <th class='redb'>référent au pole AV</th><!-- 83-->
         <th class='redb'>remarques sur le contact</th><!-- 84-->
         <th class='redb'>type porte Part Lab indus</th><!-- 85-->
         <th class='redb'>date validité</th><!-- 86-->
         <th class='redb'>nom</th><!-- 87-->
         <th class='redb'>Email</th><!--88 -->
         <th class='redb'>Anciens mail non valide</th><!-- 89-->
         <th class='redb'>tel</th><!-- 90-->
         <th class='redb'>périmètre DGE</th><!-- 91-->
         <th class='green'>Type Questionnaire</th><!-- 92-->
         <th class='green'> Retours Y X</th><!-- 93-->
         <th class='green'>Selectionn DGE Y 2</th><!--94 -->
         <th class='green'>Selectionn DGE Y 1</th><!--95 -->
         <th class='green'>Selection DGE Y</th><!-- 96-->
         <th class='green'>Etat retour Y 1</th><!-- 97-->
         <th class='green'>Etat retour Y</th><!-- 98-->
         <th class='green'>Remarques2</th><!-- 99-->
         <th class='green'>A faire</th><!-- 100-->
    
        </tr>
        </thead>
    
  • KeoughKeough Posts: 10Questions: 1Answers: 0

    my html part two
    ```
    <tbody>

      <tr>
         <td> </td> <!--0 -->
         <td class='table-line1'>  </td>  <!-- 1-->
         <td class='table-line2'> <a href= user/select > </a></td> <!--2 -->
         <td class='table-line1'></td><!--3 -->
         <td class='table-line2'></td><!-- 4-->
         <td class='table-line1'></td><!--5 -->
         <td class='table-line2'> </td><!--6 -->
         <td class='table-line1'>  </td><!--7 -->
         <td class='table-line2'> </td><!-- 8-->
         <td class='table-line1'></td><!-- 9-->
         <td class='table-line1'> </td><!--10 -->
         <td class='table-line1'></td><!--11 -->
         <td class='table-line1'> </td><!--12 -->
         <td class='table-line1'>  </td><!--13 -->
         <td class='table-line1'>  </td><!--14 -->
         <td class='table-line1'>  </td><!--15 -->
         <td class='table-line1'>  </td><!-- 16-->
         <td class='table-line1'>  </td><!--17 -->
         <td class='table-line1'>  </td><!--18 -->
         <td class='table-line1'>  </td><!-- 19-->
         <td class='table-line1'>  </td><!--20 -->
         <td class='table-line1'>  </td><!--21 -->
         <td class='table-line1'>  </td><!--22 -->
         <td class='table-line1'>  </td><!--23 -->
         <td class='table-line1'>  </td><!--24 -->
         <td class='table-line1'>  </td><!-- 25-->
         <td class='table-line1'>  </td><!--26 -->
         <td class='table-line1'>  </td><!--27 -->
         <td class='table-line1'>  </td><!--28 -->
         <td class='table-line1'>  </td><!--29 -->
         <td class='table-line1'>  </td><!--30 -->
         <td class='table-line1'>  </td><!--31 -->
         <td class='table-line1'>  </td><!--32 -->
         <td class='table-line1'>  </td><!--33 -->
         <td class='table-line1'>  </td><!-- 34-->
         <td class='table-line1'>  </td><!--35 -->
         <td class='table-line1'>  </td><!-- 36-->
         <td class='table-line1'> </td><!--37 -->
         <td class='table-line1'> </td><!--38 -->
         <td class='table-line1'>  </td><!--39 -->
         <td class='table-line1'>  </td><!--40 -->
         <td class='table-line1'>  </td><!--41 -->
         <td class='table-line1'>  </td><!--42 -->
         <td class='table-line1'>  </td><!--43 -->
         <td class='table-line1'>  </td><!--44 -->
         <td class='table-line1'>  </td><!--45 -->
         <td class='table-line1'>  </td><!--46 -->
         <td class='table-line1'>  </td><!--47 -->
         <td class='table-line1'>  </td><!--48 -->
         <td class='table-line1'>  </td><!--49 -->
         <td class='table-line1'>  </td><!--50 -->
         <td class='table-line1'>  </td><!--51 -->
         <td class='table-line1'>  </td><!--52 -->
         <td class='table-line1'>  </td><!--53 -->
         <td class='table-line1'>  </td><!--54 -->
         <td class='table-line1'>  </td><!-- 55-->
         <td class='table-line1'>  </td><!--56 -->
         <td class='table-line1'>  </td><!--57 -->
         <td class='table-line1'>  </td><!--58 -->
         <td class='table-line1'>  </td><!--59 -->
         <td class='table-line1'>  </td><!-- 60-->
         <td class='table-line1'>  </td><!-- 61-->
         <td class='table-line1'>  </td><!-- 62-->
         <td class='table-line1'>  </td><!-- 63-->
         <td class='table-line1'>  </td><!-- 64-->
         <td class='table-line1'>  </td><!-- 65-->
         <td class='table-line1'>  </td><!-- 66-->
         <td class='table-line1'>  </td><!-- 67-->
         <td class='table-line1'>  </td><!-- 68-->
         <td class='table-line1'>  </td><!-- 69-->
         <td class='table-line1'>  </td><!-- 70-->
         <td class='table-line1'>  </td><!-- 71-->
         <td class='table-line1'>  </td><!-- 72-->
         <td class='table-line1'>  </td><!-- 73-->
         <td class='table-line1'>  </td><!-- 74-->
         <td class='table-line1'>  </td><!-- 75-->
         <td class='table-line1'>  </td><!-- 76-->
         <td class='table-line1'>  </td><!-- 77-->
         <td class='table-line1'>  </td><!-- 78-->
         <td class='table-line1'>  </td><!-- 79-->
         <td class='table-line1'>  </td><!-- 80-->
         <td class='table-line1'>  </td><!-- 81-->
         <td class='table-line1'>  </td><!-- 82-->
         <td class='table-line1'>  </td><!-- 83-->
         <td class='table-line1'>  </td><!-- 84-->
         <td class='table-line1'> </td><!-- 85-->
         <td class='table-line1'>  </td><!-- 86-->
         <td class='table-line1'>  </td><!-- 87-->
         <td class='table-line1'>  </td><!-- 88-->
         <td class='table-line1'>  </td><!-- 89-->
         <td class='table-line1'>  </td><!-- 90-->
         <td class='table-line1'>  </td><!-- 91-->
         <td class='table-line1'>  </td><!-- 92-->
         <td class='table-line1'>  </td><!-- 93-->
         <td class='table-line1'> </td><!-- 94-->
         <td class='table-line1'>  </td><!-- 95-->
         <td class='table-line1'>  </td><!-- 96-->
         <td class='table-line1'>  </td><!-- 97-->
         <td class='table-line1'>  </td><!-- 98-->
         <td class='table-line1'>  </td><!-- 99-->
         <td class='table-line1'>  </td><!-- 100-->
      </tr>
    </tbody></table>
    

    </div>
    </div>

  • kthorngrenkthorngren Posts: 20,379Questions: 26Answers: 4,781

    My guess is your HTML table does not match your Datatables config. Hard to tell without seeing snippets of your code. I would start by making sure you meet the requirements listed here:
    https://datatables.net/manual/installation#Requirements

    Kevin

  • KeoughKeough Posts: 10Questions: 1Answers: 0

    im in model mvc
    my controllers part one
    ```
    public function info_bdd()
    {

            // Connexion a la base de données
    
    
    
            // Création de la erquêtes de l'envoi des données,
            $columns = array(
                0 => '',
                1 => 'N',
                2 => 'Nom_du_projet',
                3 => 'DAS',
                4 => 'Cat_de_projet',
                5 => 'Th_me',
                6 => 'P_le_Leader',
                7 => 'Porteur',
                8 => 'College_Porteur',
                9 => 'Description',
                10 => 'Descriptif_D_taill',
                11 => 'Partenaires',
                12 => 'Date_de_d_marrage',
                13 => 'Date_de_fin_init',
                14 => 'Dur_e_init_mois',
                15 => 'Co_t_total_k',
                16 => 'Aide_totale_obtenue_K',
                17 => 'Ann_e_de_Financement',
                18 => 'Type_de_Projet_ComLab',
                19 => 'Financement',
                20 => 'Type_de_Financement',
                21 => 'Priorit_AV',
                22 => 'Priorit_DGE',
                23 => 'Priorit_Globale',
                24 => 'Nb_Infos',
                25 => 'Synth_se',
                26 => 'Date_MaJ_info_Projet',
                27 => 'Statut_Projet',
                28 => 'AnneeFin_Projet',
                29 => 'Niveau_TRL_D_but',
                30 => 'Niveau_TRL_Fin',
                31 => 'Projet_Amont',
                32 => 'Projet_Aval',
                33 => 'D_tails_Poursuite_Pjt',
                34 => 'A_AERONAUTIQUE',
                35 => 'E_ESPACE',
                36 => 'S_SYST_EMBARQUES',
                37 => 'D_APPLI_HORS_AEROSPATIAL',
                38 => 'date_effective_de_d_but_des_travaux_de_R_D_JJ_MM_AAAA',
                39 => 'date_effective_de_fin_des_travaux_de_R_D_JJ_MM_AAAA',
                40 => 'succ_s_technologique_du_projet',
                41 => 'CommentairesSucc_sTechno',
                42 => 'es_chercheurs_d_organismes_de_recherche_impliqu_s_dans_le_projet',
                43 => 'es_chercheurs_ing_nieurs_d_entreprises_impliqu_s_dans_le_projet',
                44 => 'nombre_de_nouveaux_proc_d_s_cr_s_dans_le_cadre_du_projet',
                45 => 'nombre_de_nouveaux_produits_d_velopp_s_dans_le_cadre_du_projet',
                46 => 'nombre_de_nouveaux_services_issus_du_projet',
                47 => 'emplois_cr_s_pendant_la_r_alisation_du_projet',
                48 => 'emplois_maintenus_pendant_la_r_alisation_du_projet',
                49 => 'd_penses_r_elles_des_organismes_de_recherche_pendant_le_projet',
                50 => 'd_penses_r_elles_des_entreprises_pendant_le_projet',
                51 => 'succ_s_commercial',
                52 => 'D_tails_Non_Succ_s_Commercial',
                53 => 'nombre_cumul_de_produits_mis_sur_le_march',
                54 => 'nombre_cumul_s_de_proc_d_s_mis_sur_le_march',
                55 => 'nombre_cumul_s_de_services_mis_sur_le_march',
                56 => 'Chiffre_d_affaires_g_n_r_depuis_le_lancement_sur_le_march',
                57 => 'Date_Debut_G_n_ration_CA',
                58 => 'nombre_cumul_d_emplois_cr_s_1_an_apr_s_la_fin_du_projet_en_ETP',
                59 => 'cumul_d_emplois_maintenus_1_an_apr_s_la_fin_du_projet_en_ETP',
                60 => 'obligatoirement_compris_entre_N_3_et_N_7_apr_s_la_fin_du_projet',
                61 => 'nombre_cumul_d_emplois_cr_s_X_ans_apr_s_la_fin_du_projet_en_ETP',
                62 => 'cumul_d_emplois_maintenus_X_ans_apr_s_la_fin_du_projet_en_ETP',
                63 => 'nombre_cumul_de_brevets_d_pos_s_X_ans_et_plus',
                64 => 'd_autres_titres_de_propri_t_intellectuelle_d_pos_s_X_ans_et_plus',
                65 => 'Commentaires_Droits_de_PI',
                66 => 'nombre_cumul_d_articles_scientifiques_publi_s',
                67 => 'Publications_Internationnales',
                68 => 'nombre_cumul_de_cr_ations_d_entreprises_suite_au_projet',
                69 => 'Briques_Technologiques_Amelioration_MethodesIndus',
                70 => 'Cr_ation_de_partenariat',
                71 => 'Produits',
                72 => 'Commentaires_Retomb_s_du_projet',
                73 => 'remarques1',
                74 => 'Cat_gories_des_R_sultats',
                75 => 'March_vis_Aero_Espace_Sant_Agro_Agri_Transport_terrestre',
                76 => 'Blian',
                77 => 'REX',
                78 => 'Remarques_Internes',
                79 => 'Accord_de_Consortium',
                80 => 'Demande_d_accompagnement',
                81 => 'r_alis_s_Poster_Vid_o_CP_Rapport_Activit_RA_Avion_du_Futur_ADF',
                82 => 'le_projet_a_t_pr_sent_TechnDay_TD_Forum_Tehcnique_Arcachon_FTA',
                83 => 'R_f_rent_au_pole_AV',
                84 => 'Remaques_Sur_Contact',
                85 => 'Type_Port_Part_Lab_Indus',
                86 => 'Date_Validit',
                87 => 'Nom',
                88 => 'Email',
                89 => 'Anciens_Mail_Non_Valide',
                90 => 'Tel',
                91 => 'P_rim_tre_DGE',
                92 => 'Type_Questionnaire',
                93 => 'Retours_Y_X',
                94 => 'S_lectionn_DGE_Y_2',
                95 => 'S_lectionn_DGE_Y_1',
                96 => 'S_lectionn_DGE_Y',
                97 => 'Etat_Retour_Y_1',
                98 => 'Etat_Retour_Y',
                99 => 'Remarques2',
             100 => 'A_Faire',
    
    
            );
            $limit = $this->input->post('length');
            $start = $this->input->post('start');
            $dir   = $this->input->post('order')[1]['dir'];
    
            $db= $this->Bdd_model->get_db();
            $totalFiltered = $db;
    
            if(empty($this->input->post('search')['value']))
            {
                // Ne pas oublier de reseigné les variables dans getdball
                $db = $this->bdd_model->get_db_all($limit,$start,$dir);
            }
                else {
                    $search = $this->input->post('search')['value'];
                                    // Ne pas oublier de reseigné les variables dans dbsearch
                    $db     = $this->bdd_model->db_search($limit,$start,$search,$col,$dir);
                    // Ne pas oublier de reseigné les variables dans db_search_count
                    $totalFiltered = $this->bdd_model->db_search_count($search);
    
  • KeoughKeough Posts: 10Questions: 1Answers: 0

    my controllers part two
    ```
    }
    if(!empty($db))
    {
    foreach ($db as $row)
    {

                $nestedData['N'] = $row->N; // 1
                $nestedData['Nom_du_projet'] = $row->Nom_du_projet;// 2
                $nestedData['DAS'] = $row->DAS; // 3
                $nestedData['Cat_de_projet'] = $row->Cat_de_projet; // 4
                $nestedData['Th_me'] = $row->Th_me; // 5
                $nestedData['P_le_Leader'] = $row->P_le_Leader; // 6
                $nestedData['Porteur'] = $row->Porteur; // 7
                $nestedData['College_Porteur'] = $row->College_Porteur; // 8
                $nestedData['Description'] = $row->Description; // 9
                $nestedData['Descriptif_D_taill'] = $row->Descriptif_D_taill; // 10
                $nestedData['Partenaires'] = $row->Partenaires; // 11
                $nestedData['Date_de_d_marrage'] = $row->Date_de_d_marrage; // 12
                $nestedData['Date_de_fin_init'] = $row->Date_de_fin_init; // 13
                $nestedData['Dur_e_init_mois'] = $row->Dur_e_init_mois; // 14
                $nestedData['Co_t_total_k'] = $row->Co_t_total_k; // 15
                $nestedData['Aide_totale_obtenue_K'] = $row->Aide_totale_obtenue_K; // 16
                $nestedData['Ann_e_de_Financement'] = $row->Ann_e_de_Financement;// 17
                $nestedData['Type_de_Projet_ComLab'] = $row->Type_de_Projet_ComLab; // 18
                $nestedData['Financement'] = $row->Financement; // 19
                $nestedData['Type_de_Financement'] = $row->Type_de_Financement; // 20
                $nestedData['Priorit_AV'] = $row->Priorit_AV; // 21
                $nestedData['Priorit_DGE'] = $row->Priorit_DGE; // 22
                $nestedData['Priorit_Globale'] = $row->Priorit_Globale; // 23
                $nestedData['Nb_Infos'] = $row->Nb_Infos; // 24
                $nestedData['Synth_se'] = $row->Synth_se; // 25
                $nestedData['Date_MaJ_info_Projet'] = $row->Date_MaJ_info_Projet; // 26
                $nestedData['Statut_Projet'] = $row->Statut_Projet; // 27
                $nestedData['AnneeFin_Projet'] = $row->AnneeFin_Projet; // 28
                $nestedData['Niveau_TRL_D_but'] = $row->Niveau_TRL_D_but; // 29
                $nestedData['Niveau_TRL_Fin'] = $row->Niveau_TRL_Fin;// 30
                $nestedData['Projet_Amont'] = $row->Projet_Amont;// 31
                $nestedData['Projet_Aval'] = $row->Projet_Aval;// 32
                $nestedData['D_tails_Poursuite_Pjt'] = $row->D_tails_Poursuite_Pjt;// 33
                $nestedData['A_AERONAUTIQUE'] = $row->A_AERONAUTIQUE;// 34
                $nestedData['E_ESPACE'] = $row->E_ESPACE;// 35
                $nestedData['S_SYST_EMBARQUES'] = $row->S_SYST_EMBARQUES;// 36
                $nestedData['D_APPLI_HORS_AEROSPATIAL'] = $row->D_APPLI_HORS_AEROSPATIAL;// 37
                $nestedData['date_effective_de_d_but_des_travaux_de_R_D_JJ_MM_AAAA'] = $row->date_effective_de_d_but_des_travaux_de_R_D_JJ_MM_AAAA; // 38
                $nestedData['date_effective_de_fin_des_travaux_de_R_D_JJ_MM_AAAA'] = $row->date_effective_de_fin_des_travaux_de_R_D_JJ_MM_AAAA; // 39
                $nestedData['succ_s_technologique_du_projet'] = $row->succ_s_technologique_du_projet; // 40
                $nestedData['CommentairesSucc_sTechno'] = $row->CommentairesSucc_sTechno; // 41
                $nestedData['es_chercheurs_d_organismes_de_recherche_impliqu_s_dans_le_projet'] = $row->es_chercheurs_d_organismes_de_recherche_impliqu_s_dans_le_projet; // 42
                $nestedData['es_chercheurs_ing_nieurs_d_entreprises_impliqu_s_dans_le_projet'] = $row->es_chercheurs_ing_nieurs_d_entreprises_impliqu_s_dans_le_projet; // 43
                $nestedData['nombre_de_nouveaux_proc_d_s_cr_s_dans_le_cadre_du_projet'] = $row->nombre_de_nouveaux_proc_d_s_cr_s_dans_le_cadre_du_projet; // 44
                $nestedData['nombre_de_nouveaux_produits_d_velopp_s_dans_le_cadre_du_projet'] = $row->nombre_de_nouveaux_produits_d_velopp_s_dans_le_cadre_du_projet; // 45
                $nestedData['nombre_de_nouveaux_services_issus_du_projet'] = $row->nombre_de_nouveaux_services_issus_du_projet; // 46
                $nestedData['emplois_cr_s_pendant_la_r_alisation_du_projet'] = $row->emplois_cr_s_pendant_la_r_alisation_du_projet; // 47
                $nestedData['emplois_maintenus_pendant_la_r_alisation_du_projet'] = $row->emplois_maintenus_pendant_la_r_alisation_du_projet; // 48
                $nestedData['d_penses_r_elles_des_organismes_de_recherche_pendant_le_projet'] = $row->d_penses_r_elles_des_organismes_de_recherche_pendant_le_projet; // 49
                $nestedData['d_penses_r_elles_des_entreprises_pendant_le_projet'] = $row->d_penses_r_elles_des_entreprises_pendant_le_projet; // 50
                $nestedData['succ_s_commercial'] = $row->succ_s_commercial; // 51
                $nestedData['D_tails_Non_Succ_s_Commercial'] = $row->D_tails_Non_Succ_s_Commercial; // 52
                $nestedData['nombre_cumul_de_produits_mis_sur_le_march'] = $row->nombre_cumul_de_produits_mis_sur_le_march; // 53
                $nestedData['nombre_cumul_s_de_proc_d_s_mis_sur_le_march'] = $row->nombre_cumul_s_de_proc_d_s_mis_sur_le_march; // 54
                $nestedData['nombre_cumul_s_de_services_mis_sur_le_march'] = $row->nombre_cumul_s_de_services_mis_sur_le_march; // 55
                $nestedData['Chiffre_d_affaires_g_n_r_depuis_le_lancement_sur_le_march'] = $row->Chiffre_d_affaires_g_n_r_depuis_le_lancement_sur_le_march; // 56
                $nestedData['Date_Debut_G_n_ration_CA'] = $row->Date_Debut_G_n_ration_CA; // 57
                $nestedData['nombre_cumul_d_emplois_cr_s_1_an_apr_s_la_fin_du_projet_en_ETP'] = $row->nombre_cumul_d_emplois_cr_s_1_an_apr_s_la_fin_du_projet_en_ETP; // 58
                $nestedData['cumul_d_emplois_maintenus_1_an_apr_s_la_fin_du_projet_en_ETP'] = $row->cumul_d_emplois_maintenus_1_an_apr_s_la_fin_du_projet_en_ETP; // 59
                $nestedData['obligatoirement_compris_entre_N_3_et_N_7_apr_s_la_fin_du_projet'] = $row->obligatoirement_compris_entre_N_3_et_N_7_apr_s_la_fin_du_projet; // 60
                $nestedData['nombre_cumul_d_emplois_cr_s_X_ans_apr_s_la_fin_du_projet_en_ETP'] = $row->nombre_cumul_d_emplois_cr_s_X_ans_apr_s_la_fin_du_projet_en_ETP; // 61
                $nestedData['cumul_d_emplois_maintenus_X_ans_apr_s_la_fin_du_projet_en_ETP'] = $row->cumul_d_emplois_maintenus_X_ans_apr_s_la_fin_du_projet_en_ETP;// 62
                $nestedData['nombre_cumul_de_brevets_d_pos_s_X_ans_et_plus'] = $row->nombre_cumul_de_brevets_d_pos_s_X_ans_et_plus;// 63
                $nestedData['d_autres_titres_de_propri_t_intellectuelle_d_pos_s_X_ans_et_plus'] = $row->d_autres_titres_de_propri_t_intellectuelle_d_pos_s_X_ans_et_plus; // 64
                $nestedData['Commentaires_Droits_de_PI'] = $row->Commentaires_Droits_de_PI; // 65
                $nestedData['nombre_cumul_d_articles_scientifiques_publi_s'] = $row->nombre_cumul_d_articles_scientifiques_publi_s; // 66
                $nestedData['Publications_Internationnales'] = $row->Publications_Internationnales; // 67
                $nestedData['nombre_cumul_de_cr_ations_d_entreprises_suite_au_projet'] = $row->nombre_cumul_de_cr_ations_d_entreprises_suite_au_projet; // 68
                $nestedData['Briques_Technologiques_Amelioration_MethodesIndus'] = $row->Briques_Technologiques_Amelioration_MethodesIndus; // 69
                $nestedData['Cr_ation_de_partenariat'] = $row->Cr_ation_de_partenariat; // 70
                $nestedData['Produits'] = $row->Produits; // 71
                $nestedData['Commentaires_Retomb_s_du_projet'] = $row->Commentaires_Retomb_s_du_projet; // 72
                $nestedData['remarques1'] = $row->remarques1; // 73
                $nestedData['Cat_gories_des_R_sultats'] = $row->Cat_gories_des_R_sultats; // 74
                $nestedData['March_vis_Aero_Espace_Sant_Agro_Agri_Transport_terrestre'] = $row->March_vis_Aero_Espace_Sant_Agro_Agri_Transport_terrestre; // 75
                $nestedData['Blian'] = $row->Blian; // 76
                $nestedData['REX'] = $row->REX; // 77
                $nestedData['Remarques_Internes'] = $row->Remarques_Internes; // 78
                $nestedData['Accord_de_Consortium'] = $row->Accord_de_Consortium; // 79
                $nestedData['Demande_d_accompagnement'] = $row->Demande_d_accompagnement; // 80
                $nestedData['r_alis_s_Poster_Vid_o_CP_Rapport_Activit_RA_Avion_du_Futur_ADF'] = $row->r_alis_s_Poster_Vid_o_CP_Rapport_Activit_RA_Avion_du_Futur_ADF; // 81
                $nestedData['le_projet_a_t_pr_sent_TechnDay_TD_Forum_Tehcnique_Arcachon_FTA'] = $row->le_projet_a_t_pr_sent_TechnDay_TD_Forum_Tehcnique_Arcachon_FTA; // 82
                $nestedData['R_f_rent_au_pole_AV'] = $row->R_f_rent_au_pole_AV;// 83
                $nestedData['Remaques_Sur_Contact'] = $row->Remaques_Sur_Contact; // 84
                $nestedData['Type_Port_Part_Lab_Indus'] = $row->Type_Port_Part_Lab_Indus; // 85
                $nestedData['Date_Validit'] = $row->Date_Validit; // 86
                $nestedData['Nom'] = $row->Nom;// 87
                $nestedData['Email'] = $row->Email; // 88
                $nestedData['Anciens_Mail_Non_Valide'] = $row->Anciens_Mail_Non_Valide; // 89
                $nestedData['Tel'] = $row->Tel;// 90
                $nestedData['P_rim_tre_DGE'] = $row->P_rim_tre_DGE; // 91
                $nestedData['Type_Questionnaire'] = $row->Type_Questionnaire; // 92
                $nestedData['Retours_Y_X'] = $row->Retours_Y_X;// 93
                $nestedData['S_lectionn_DGE_Y_2'] = $row->S_lectionn_DGE_Y_2; // 94
                $nestedData['S_lectionn_DGE_Y_1'] = $row->S_lectionn_DGE_Y_1; // 95
                $nestedData['S_lectionn_DGE_Y'] = $row->S_lectionn_DGE_Y;// 96
                $nestedData['Etat_Retour_Y_1'] = $row->Etat_Retour_Y_1;// 97
                $nestedData['Etat_Retour_Y'] = $row->Etat_Retour_Y;// 98
                $nestedData['Remarques2'] = $row->Remarques2;// 99
                $nestedData['A_Faire'] = $row->A_Faire;// 100
    
                        $data[] = $nestedData;
    
                    }
                }
    
    
            $output = array(
                "draw" =>intval($this->input->post('draw')),
                "recordsTotal" =>intval($db),
                "recordsFiltered" =>intval($totalFiltered),
    
                "data" =>$data
            );
            echo json_encode($output);
    
                // $this->data['output']=$output;
                // $this->data['data']=$data;
                $this->load->view("user/login/test");
    
    
    
        }
    
  • kthorngrenkthorngren Posts: 20,379Questions: 26Answers: 4,781
    edited June 2018

    I didn't count the number of columns you have but it looks like the problem is mismatched table -tag theadtags and-option columns.data` definitions.

    In your table you have this:

      <tr>
         <td> </td> <!--0 -->
         <td class='table-line1'>  </td>  <!-- 1-->
         <td class='table-line2'> <a href= user/select > </a></td> <!--2 -->
    

    However in your Datatables you have this:

                columns : [
     
                       {"data" : "N"}, // 1
                       {"data" : "Nom_du_projet"}, // 2
    .....
    

    You might need to move your columnDefs config for column 0 into the columns.data option:

        'columnDefs': [
     
          {'targets':[9,10,11], render: function ( data, type, row ) {return data.substr( 0, 10 );}},
          {'targets': 0,'checkboxes': {'selectRow': true},'orderable': false},
          // {'targets': 2,'width':'250px'},
     
      ],
    

    Kevin

  • KeoughKeough Posts: 10Questions: 1Answers: 0

    i try this but i have this error
    Uncaught TypeError: Cannot read property 'style' of undefined
    at Ea (jquery.dataTables.min.js:62)
    at ga (jquery.dataTables.min.js:48)
    at e (jquery.dataTables.min.js:92)
    at HTMLTableElement.<anonymous> (jquery.dataTables.min.js:92)
    at Function.each (jquery.js:354)
    at jQuery.fn.init.each (jquery.js:189)
    at jQuery.fn.init.m [as dataTable] (jquery.dataTables.min.js:82)
    at jQuery.fn.init.h.fn.DataTable (jquery.dataTables.min.js:164)
    at HTMLDocument.<anonymous> (info_bdd:252)
    at mightThrow (jquery.js:3534)

    thanks for you help

  • kthorngrenkthorngren Posts: 20,379Questions: 26Answers: 4,781

    You may need to add one or both of the following to column 0:

                    data: null,
                    defaultContent: '',
    

    Kevin

  • KeoughKeough Posts: 10Questions: 1Answers: 0

    Your solution its ok but i have even problem

    Uncaught TypeError: Cannot read property 'style' of undefined
    at Ea (jquery.dataTables.min.js:62)
    at ga (jquery.dataTables.min.js:48)
    at e (jquery.dataTables.min.js:92)
    at HTMLTableElement.<anonymous> (jquery.dataTables.min.js:92)
    at Function.each (jquery.js:354)
    at jQuery.fn.init.each (jquery.js:189)
    at jQuery.fn.init.m [as dataTable] (jquery.dataTables.min.js:82)
    at jQuery.fn.init.h.fn.DataTable (jquery.dataTables.min.js:164)
    at HTMLDocument.<anonymous> (info_bdd:252)
    at mightThrow (jquery.js:3534)

    but your solution corrected one problem really thanks for you time for my problem Kevin

  • kthorngrenkthorngren Posts: 20,379Questions: 26Answers: 4,781

    The only other thing that stands out is your ajax option config:

            // On charge les données à partir d'une source Ajax
            ajax : "<?php echo site_url('User/info_bdd') ?>",
     
                "type": "POST",
                
                columns : [
    ....
    

    If you want the "type": "POST", to be applied then you need to place the URL and type option inside an object for the ajax option. Take a look at the 4th example here:
    https://datatables.net/reference/option/ajax#Examples

    Uncaught TypeError: Cannot read property 'style' of undefined

    I believe this is normally due to mismatches between the HTML table and Datatables config. Make sure all your columns.data objects match with what is returned in your server script. Also I would use the browser's developer tools to verify the ajax response is what you expect.

    Kevin

This discussion has been closed.