[ad_1]
I have an interface where there is a button.
When I click on this button a table must be displayed.
how can i do this ?
This is the code I’ve done :
//This is the button
<div class="panel-body">
<p><button type="button" class="btn btn-lg btn-default" id ="parser" name="parser" onclick="" >Parser</button></p>
</div>
//The table I need to display
<table class="table table-striped table-bordered table-hover" id="matable">
<thead>
<tr>
<th>#</th>
<th>Date</th>
<th>ATM</th>
<th>Ligne</th>
<th>Event</th>
<th>Montant</th>
<th>Type</th>
<th>Retour trans</th>
<th>Retour carte</th>
<th>Carte insérée</th>
</tr>
</thead>
<tbody>
<?php
while($row=mysqli_fetch_row($res)){
?>
<tr>
<td><?php echo $row[0] ?></td>
<td><?php echo $row[5] ?></td>
<td><?php echo $row[1] ?></td>
<td><?php echo $row[2] ?></td>
<td><?php echo $row[6] ?></td>
<td><?php echo $row[8] ?></td>
<td><?php echo $row[9] ?></td>
<td><?php echo $row[10] ?></td>
<td><?php echo $row[11] ?></td>
<td><?php echo $row[12] ?></td>
</tr>
<?php }?>
</tbody>
</table>
Do I need to use a function in JS? or the function onclick?
Thanks in advance for your help.
[ad_2]