add photo column to the voiliers table and display images in the AJAX data

This commit is contained in:
ItsTheSky
2026-05-29 00:08:17 +02:00
parent dffb6cf98f
commit 62568e59d1
2 changed files with 6 additions and 0 deletions

View File

@ -111,6 +111,7 @@
<thead> <thead>
<tr> <tr>
<td>&nbsp;</td> <td>&nbsp;</td>
<td>Photo</td>
<td>Voilier</td> <td>Voilier</td>
<td>Skippers</td> <td>Skippers</td>
<td>Abandon</td> <td>Abandon</td>

View File

@ -59,6 +59,11 @@ function rafraichirTableau(voiliers) {
td_id.innerText = i.toString(); td_id.innerText = i.toString();
tr.appendChild(td_id); tr.appendChild(td_id);
const td_photo = document.createElement('td');
td_photo.width = 400;
td_photo.innerHTML = '<img src="' + voilier.photo + '" alt="' + voilier.nom + '" width="400">';
tr.appendChild(td_photo);
const td_nom = document.createElement('td'); const td_nom = document.createElement('td');
td_nom.innerText = voilier.nom + " " + voilier.année td_nom.innerText = voilier.nom + " " + voilier.année
tr.appendChild(td_nom); tr.appendChild(td_nom);