Solved

Options Buttons Misbehaving....

Posted on 2004-10-12
11
164 Views
Last Modified: 2010-04-25
I have a form created with Dreamweaver that has standard Yes/No option buttons that are allowing the user to choose both options.  I've not encountered this before.  Anyone know how to fix it?
0
Comment
Question by:johnson00
  • 4
  • 3
  • 3
  • +1
11 Comments
 
LVL 14

Expert Comment

by:Esopo
ID: 12292004
What do you call standard Yes/No buttons? Would you mind to post some code?
0
 
LVL 49

Expert Comment

by:Ryan Chong
ID: 12294390
try set the Yes/No option buttons with same name?
0
 
LVL 2

Author Comment

by:johnson00
ID: 12297781
They have the same name, and both are currently set to return True as a value, as when I returned False as a value to my Access database, the report did not pick up the "false" and mark that option button.  Does that make sense?
0
 
LVL 2

Author Comment

by:johnson00
ID: 12301326
<INPUT TYPE="radio" NAME="SCEmployedY" VALUE="TRUE">
        Yes
        <INPUT TYPE="radio" NAME="SCEmployedN" VALUE="TRUE">
        No

I guess they are named differently.  I had difficulty getting them to return to a database correctly when they were named the same.  I need this value to correctly populate a radio button in an access report, which is why I split them up.  How SHOULD I have done this?
0
 
LVL 2

Author Comment

by:johnson00
ID: 12301330
Points increased
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 14

Expert Comment

by:Esopo
ID: 12303154
I think I understand what you want. First of all, how do you spect different returns if they both have TRUE as the value?

Give the radio options the same name and different values, exmpl:

 <INPUT TYPE="radio" NAME="radio1" VALUE="1"> Yes
 <INPUT TYPE="radio" NAME="radio1" VALUE="0"> No

Now, in ASP chech for the variable ("radio1" in this case) to see which was chosen (either 1 or 0).

Basically the "radio group" will allow for multiple choice answers and only pass to your ASP the one chosen. You group them by assigning the same name to every element but different values. You should receive it as a single variable (radio1) with a single value (either 1 or 0 for this case).

Is this helping you?
0
 
LVL 14

Expert Comment

by:Esopo
ID: 12303178
BTW: this should work for you but you could use a dropdown list aswell.

These are great to play around with the code:

http://www.w3schools.com/html/tryit.asp?filename=tryhtml_radio

http://www.w3schools.com/html/tryit.asp?filename=tryhtml_select2
0
 
LVL 49

Expert Comment

by:Ryan Chong
ID: 12304454
>><INPUT TYPE="radio" NAME="SCEmployedY" VALUE="TRUE">
        Yes
        <INPUT TYPE="radio" NAME="SCEmployedN" VALUE="TRUE">
        No

ya, try as:

<INPUT TYPE="radio" NAME="SCEmployed" VALUE="TRUE">
        Yes
        <INPUT TYPE="radio" NAME="SCEmployed" VALUE="FALSE">
        No
0
 
LVL 19

Accepted Solution

by:
webwoman earned 250 total points
ID: 12310287
If you're using an Access database, and you have the field set as a yes/no field, you should use -1 for the true value and 0 for the false.

That's the values Access is looking for. You can't use a string ("TRUE" "FALSE") because that's NOT a text field.
0
 
LVL 49

Expert Comment

by:Ryan Chong
ID: 12310439
We can still put the value as "true" or "false", as the SQL statement to be executed is just a string, and the statement will recognize the value of "true" or "false", as it's a boolean value. Of course using of "-1" and "0" that webwoman mentioned will always works as well.

cheers ;-)
0
 
LVL 2

Author Comment

by:johnson00
ID: 12312715
webwoman,

that is exactly the information I was looking for.  Thanks!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For those who don't know, Adobe Dreamweaver is a popular commercial web editor that enables you to design, build and manage complex websites. The editor is a WYSIWYG (What You See Is What You Get) web editor, which means that you can create your web…
This article is very specific and is only intended to help if you are installing Dreamweaver 8 in a Windows 7 environment with Office 2007 installed.   I'm not sure why Microsoft tends to release OS' that should not be released but they do.  Windows…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now