SitePoint Sponsor |
|
User Tag List
Results 1 to 5 of 5
-
Jul 25, 2003, 02:58 #1
- Join Date
- Nov 2000
- Location
- Oslo, Norway
- Posts
- 413
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Hiding a table row based on radio button selection
Hi,
I'm looking to hide/display certain table rows based on which radio button is selected. I've found some code that does this using checkboxes, but I need radio buttons (only one selection allowed) and I can't seem to get it to work.
Does anyone know of such a script?
Thanks in advance !
-
Jul 25, 2003, 08:32 #2
- Join Date
- Feb 2000
- Location
- where the World once stood
- Posts
- 700
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Hi,
check out the dHTML tutorials/scripts at my site (GrassBlade). BTW: the only diff between checkbox & radio button is the latter is an array.
VinnyWhere the World Once Stood
the blades of grass
cut me still
-
Jul 25, 2003, 09:39 #3
- Join Date
- Jul 2002
- Location
- Dallas, TX
- Posts
- 2,900
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
That's not true Vinny - checkboxes are arrays too (provided you have two or more with the same name). Otherwise, they are just single elements. Likewise, a single radio button is a single element, and not a 1-length array.
-
Jul 25, 2003, 16:49 #4
- Join Date
- Feb 2000
- Location
- where the World once stood
- Posts
- 700
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Hi Beetle,
True, but exceptions to the norm are exceptions. People are not used to seeing a solitary radio button; nor would they understand an array of checkboxes. Common usage says a checkbox is used for solitary things that have no opposite -- you either want it or you don't. Radio buttons are usually used for mutually exclusive things -- male/female, on/off, screaming/loud/normal/soft/whisper. So yes, technically I fudged, but...
VinnyWhere the World Once Stood
the blades of grass
cut me still
-
Jul 25, 2003, 17:00 #5
- Join Date
- Jul 2002
- Location
- Dallas, TX
- Posts
- 2,900
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by Vincent Puglia
Yes, I realize that checkboxes are often used for "I Agree to these Terms" scenarios, but I've seen two radio buttons used for such binary situations as well, such as Google's Advanced Search (see the SafeSearch setting).
I'm not suggesting that radio-buttons should be use in single, just merely stating that checkboxes aren't always so.
Bookmarks