Forum Moderators: open
I'd like to determine if a form element is shown or hidden?
I have a form with several fields, some of which are only shown (required) when a select has a certain value, then the div which they or on is shown and so the elements are shown.
Is it possible to determine if the element is shown depending on the div/table/etc. on which it is is visible?
Thanks,
Marco
you would have your dropdown box which would be giving values like,
<select>
<option>value1</option>
<option>value2</option>
</select>
etc....
<script>
function showLayers(){
if (document.form.dropdownmenu.value == value1){
document.form.partYouWantVisible.visible = true;
}
}
</script>
you can then call this function on the onBlur of the select box so that when the user enters a value the function is called.
Hope that helps