I have written a small function that changes the visibility of two input boxes, however even if the privDinRm[1] option isnt selected the second line of code still runs making the privDinRmS box visible when it should stay invisible and i cant work out why this is happening, the first box privDinRmNm still stays hidden and works fine. I have tried it in ie and firefox but both have the same problem. any ideas would be much appreciated.
thanks in advance
code below::
function privdinrm(){
if (document.register2.privDinRm[1].selected)
document.register2.privDinRmNm.style.visibility=’visible’
document.register2.privDinRmS.style.visibility=’visible’
}