i have a javascript function dc1dc2() which i am calling with an onchange event. The idea is supposed to be that when the combobox DC1 has yes (the first option) selected, no (the second option) will be selected in DC2. brdform2 is the name of the form they're in, obviously.
This is how i figure it should work, but nothing happens, not even an error:
function dc1dc2(){
if (document.brdform2.DC1.options[0].selected=='True'){
document.brdform2.DC2.options[1].selected='True';
}else{
document.brdform2.DC2.options[0].selected='True';
}}
The below does the exactly wrong thing, in that when i select yes in DC1, it selects yes in DC2, and the same for no.
function dc1dc2(){
if (document.brdform2.DC1.options[0].selected=='True'){
document.brdform2.DC2.options[document.brdform2.DC1.selectedIndex].selected='False';
}else{ document.brdform2.DC2.options[document.brdform2.DC1.selectedIndex].selected='True';
}}
any ideas as to what's going on? or how i can get it to work?