How to prevent an object array retrieved from the database from being displayed....
How to prevent an object array retrieved from the database from being displayed....
How to prevent an object array retrieved from the database from being displayed before it is passed to DataTables and displayed on the view?
$(document).ready(function(){ $('#exemple').DataTable(); } );Identifiant | Nom | Prénom | Adresse | Téléphone | Spécialité | Département | |
---|---|---|---|---|---|---|---|
<?php echo "<p>".$listemedecin[$i]->getidmedecin()."";?> | <?php echo "<p>".$listemedecin[$i]->getnommedecin()." ";?> |
<?php echo "<p>".$listemedecin[$i]->getprenommedecin()." ";?> |
<?php echo "<p>".$listemedecin[$i]->getadressemedecin()." ";?> |
<?php echo "<p>".$listemedecin[$i]->gettelmedecin()." ";?> |
<?php echo "<p>".$listemedecin[$i]->getspecialitecomplementaire()." ";?> |
<?php echo "<p>".$listemedecin[$i]->getdepartement()." ";?> |
Modifier |
Hello, I've been trying to resolve this case all morning.. So, I've used DataTables to show the data from my database and print the table with pagination, search etc.. But as you can see in the first image when I click on the button to go to the view, first(image2) it shows all the data (1000+ information) and after (image3) it shows the table with everything. I would like for my website to not print what we see in the second image and I can't find a way to do it... It's like the table is waiting for all the data to be retrieve for him to be printed.
image1:https://i.stack.imgur.com/CkLj2.jpg
This question has an accepted answers - jump to answer
Answers
You can hide the
table
ordiv
or whatever is appropriate for your page to hide HTMLtable
until Datatables initializes. UseinitComplete
to unhide the hidden element with Jquery or your preferred method.Kevin