Radio buttons issue with OR javascript -
could me understand correct syntax or operator in javascript. using || in script not work. have radio button list 4 values. drop down list visible on value 2 or 3. can working no problem single value of 2 no dice when add || 3. advise? in advance.
function showconvert() { if (radconvert.getvalue() == 2 || 3) { frmactivate.getitembyname("converthide").setvisible(true); } else { frmactivate.getitembyname("converthide").setvisible(false); } };
(radconvert.getvalue() == 2 || radconvert.getvalue() == 3) 2||3 =2
|| means if left not falsy use right
eg.
function(option){ option = option || {}; }
Comments
Post a Comment