I need to display an image in a div based on the select option the mouse is hovering on within a drop down menu. Here’s what I have so far. It only works for the FIRST option in the select. Any help is appreciated!
BTW it works if the drop down is in “multiple” mode.
JS:
document.getElementById("configuration").addEventListener("mouseover",configurationchange);
function configurationchange(e){
var configurationvalue = e.target.value;
fddisp_image2(configurationvalue); /* this function displays the image in div with innerhtml */
}
HTML:
<select name="configuration" id="configuration">
<option value="select">Select</option>
<option value="Square/Rect.">Square/Rectangular</option>
<option value="Oval">Oval</option>
<option value="Round">Round</option>
</select>