Quote:
Originally Posted by jmrker
My suggestion would be to hide the list again and test display status (block || none) to determine if listbox selection is to be ignored or not.
|
Yes, but you need to set the selected index back to 0, otherwise the selection remains active (and would be submitted in a form) even if the div is hidden. So I had (but waiting for the OP to say what he wanted!

)
Code:
<script type = "text/javascript">
function showListBox() {
document.getElementById("div1").style.display="block";
}
function hideListBox() {
document.getElementById("div1").style.display="none";
document.getElementById("list1").selectedIndex = 0; // cancel any selection made
}
</script>
<form name = "myform">
Something <input type = "radio" name = "rad1" onclick = "hideListBox()">
My Process <input type = "radio" name = "rad1" onclick = "showListBox()">