on 12-12-2016 2:36 PM
I have created a radio button group with 3 buttons (the first button is the default). No matter which button is selected, the first branch of my script always executes. I have verified the session.findById values several times. I have tried on both 3.0SP03 and 3.0SP04. This should be pretty simple, but obviously am overlooking something. Anyone have similar issues with radio buttons? Thanks
if(session.findById("wnd[0]/usr/radPersonas_148130827323194").selected=true){ companyCode = "TA01"; session.utils.log("branch1");} else if(session.findById("wnd[0]/usr/radPersonas_148130828546524").selected=true){ companyCode = "MA01"; session.utils.log("branch2");} else if(session.findById("wnd[0]/usr/radPersonas_148130830677553").selected=true){ companyCode = "MA02";}
Two things. First you don't need to put the "=true", because the selected will return "true" or "false". Secondly if you want the true in there it needs to be "==true". Two equal signs. Two equal signs is a comparison. One equal sign is assigning.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
94 | |
11 | |
11 | |
10 | |
9 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.