I am trying to make in javascript a option select menu where when the user selects one of the choices, an image appears on the right of the list.
This is the code ive done so far, I am really new to JS, I have my function and my code I would just like someone to point me in the right direction.
<script>
function setEntree() {
var img = document.getElementById("image");
img.src = this.value;
return false;
}
document.getElementById("entree").onchange = setEntree;
</script>
<img id="image" src="images%25202/vide.jpg"/>
<select id="entree">
<option value="vide.jpg" selected>Choisir...</option>
<option value="salade.jpg">Salade</option>
<option value="escargot.jpg">Escargot</option>
</select>
vide.png represents a null picture when the first option is selected from the start. My goal is to make a picture of a salad appear when salad is selected, etc.