var test = document.getElementById("TEST1").value; if (test.value != 1) { document.getElementById("field_DOPT").style.display='none'; } This doesn't seem to work. I am getting the TEST1 value as 1 but its not hiding the div. Any help will be appreciated. thank you