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

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -