La listbox sera définie par :
<select ... onChange="javacript:afficher_un_truc(this);">
   <option ...>...</option>
   <option ...>...</option>
 </select>  | 
La page contiendra un emplacement réservé pour le truc à afficher :
<span id="place_pour_le_truc"></span>  | 
Un bout de code Javascript va afficher quelque chose en fonction de la ligne sélectionnée.
function afficher_un_truc(la_listbox)
 {
   document.getElementById("place_pour_le_truc" ).innerHTML = "<img src=" + la_listbox.options[la_listbox.selectedIndex].value + ">"
 }  | 
 
Message édité par olivthill le 02-12-2011 à 16:46:20