1. if then statements with radio button
- Posted by msuclay at hotmail.com May 06, 2001
- 519 views
Thanks Travis and Irv for the response to the last e-mail. Now that I have learned to group the radio buttons, Could someone give me some advice how to do if then statements with them. If radiobutton1 != 0 and radiobutton2 !=0 then total = 1 X value elseif radiobutton2 !=0 and radiobutton3 !=0 then total = 2 X value ..... I need something like above, but cannot figure out the syntax. Also, I would like to make a clear button that would set all radio buttons blank if possible. Thanks for everyone help. I am a newbie, but I am enjoying everything about euphoria. Thanks, Clay
2. Re: if then statements with radio button
- Posted by Irv Mullins <irvm at ellijay.com> May 06, 2001
- 494 views
3. Re: if then statements with radio button
- Posted by Derek Parnell <ddparnell at bigpond.com> May 06, 2001
- 506 views
Hi Clay, ----- Original Message ----- From: <msuclay at hotmail.com> To: "EUforum" <EUforum at topica.com> Subject: if then statements with radio button > Now that I have learned to group the radio buttons, Could someone give me > some advice how to do if then statements with them. > > If radiobutton1 != 0 and radiobutton2 !=0 then > total = 1 X value > elseif radiobutton2 !=0 and radiobutton3 !=0 then > total = 2 X value > Try... If isChecked(radiobutton1) and isChecked(radiobutton2) then total = 1 X value elseif isChecked(radiobutton2) and isChecked(radiobutton3) then total = 2 X value To clear them... setCheck(radiobutton1, False) setCheck(radiobutton2, False) setCheck(radiobutton3, False) However, the way you are using them is not usual for Radio buttons. Usually only one in a group is "checked" at any time. Maybe you should be using CheckBox instead? The syntax above works for them to. ------ Derek Parnell Melbourne, Australia "To finish a job quickly, go slower."