View Full Version : Radio Button
cg9com
10-14-2002, 03:32 PM
I am pretty sure this can only be done with a javascript ( not entirely tho )
i am making a form, is there a way that i can have only 1 "radio" button ( IE: <input type="radio"> ) that i can click and unclick?
normally you can only slect the button, but never remove the black dot.....
any help would be appreciated thanks
Catman
10-14-2002, 04:12 PM
Off the top of my head:
<input type="radio" onclick="this.checked=!this.checked">
cg9com
10-14-2002, 06:52 PM
beautiful thank you! :)
the guy im making the site for doesnt want check boxes
( dont ask me why )
will this be recognized in the form?
whammy
10-15-2002, 01:59 AM
If that's the case, you should SERIOUSLY enlighten him!
Radio buttons are used for selecting ONE choice out of many.
Checkboxes are used for selecting/unselecting one or MULTIPLE choices (or just one!).
You shouldn't ever use a radio button for a single response, since they are intended to differentiate between many potential SINGLE responses.
That's just the way it works (and that's the way it's worked ever since internet forms were invented (I think)!)... and he needs to know that most internet users are USED to this, and EXPECT that from a form... I have had some clients that were not familiar with that, and they always capitulated once they realized that anything else is NOT user-friendly. :D
:)
glenngv
10-15-2002, 02:40 AM
i agree with whammy, but maybe there's a few exception (though i think this is not the case for cg9com). I incorporated a radio button where if you clicked an already checked radio button, it will be unchecked and all the fields associated with it is reset.
you can see and try it in
http://www21.brinkster.com/gver/ot/ot.asp
Any opinion is welcome if this implementation is not user-friendly :)
whammy
10-15-2002, 03:19 AM
:D
There are exceptions to every rule... but if there is a clear reason to break the rule, please post it (Other than my client does not know how the internet works.) - if that's the case, it's your job as a web developer to educate him - to save all of us!
;)
cg9com
10-15-2002, 05:07 PM
yes ive told him of all of this
its only for one option, otherwise i dont think i would do it
he said he would rather have the circle thingy instead of the box :)
cg9com
10-15-2002, 07:19 PM
Originally posted by whammy
my client does not know how the internet works.)
he didnt SAY that but *ahem*
lol
glenngv
10-16-2002, 02:30 AM
if your client insists on the radio button, the page should inform the user that the radio button works like a checkbox.
<input type="radio" onclick="this.checked=!this.checked" title="This works like a checkbox!">Check/Uncheck me
but still, I'd go for checkbox.
you should tell your client that using radio will confuse the user
whammy
10-16-2002, 03:18 AM
I love it when I'm right. :D (especially considering all the foot-in-mouth disease I have demonstrated. :D)
cg9com
10-16-2002, 03:30 PM
thanks for the help guys :)
cg9com
10-16-2002, 03:32 PM
Thanks for the help guys :)
i will inform him.
HUH? double post, must be my fault :confused:
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.