Solved

Options Buttons Misbehaving....

Posted on 2004-10-12
11
165 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 50

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
Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

 
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
 
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 50

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 50

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

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

Suggested Solutions

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…
I still run into .cgi files every now and then. In some instances, I actually prefer the simplicity of a .cgi script to other options. Since I use DreamWeaver extensively, what I needed was a way to open .cgi scripts in Dreamweaver. And I wanted to …
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

803 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