1. if then statements with radio button

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

new topic     » topic index » view message » categorize

2. Re: if then statements with radio button


new topic     » goto parent     » topic index » view message » categorize

3. Re: if then statements with radio button

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."

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu