?
Solved

Options Buttons Misbehaving....

Posted on 2004-10-12
11
Medium Priority
?
169 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 53

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
[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them.

 
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 53

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 1000 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 53

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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 …
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…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses

764 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