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

@ -59,6 +59,11 @@ function rafraichirTableau(voiliers) {
td_id.innerText = i.toString();
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');
td_nom.innerText = voilier.nom + " " + voilier.année
tr.appendChild(td_nom);