I am trying to display a div if user select a specific option value from a select drop down list.
Example:
The select drop down list consist of dynamic names fet
try this:
JS:
function admSelectCheck(nameSelect) { if(nameSelect){ admOptionValue = nameSelect.value; if(admOptionValue != 0){ nameSelect.style.display = ""; } else{ nameSelect.style.display = "none"; } } else{ nameSelect.style.display = "none"; } }
HTML:
Jay Sam Admin admin selected