My java script, which I got from a stack overflow question looks like this:
<script type="text/javascript">
function search() {
    var a = document.getElementByClassName("s1");
    var b = a.options[a.selectedIndex].value;
    if (b = 1) {
        document.getElementById("vmh").style.visibility = hidden
    }
    }
</script>
and there is a button that activates the function search, but the visibility is not changing
 
    