[thelist] Javascript function to disable certains parts of a form

David Ulevitch davidu at everydns.net
Sun Jun 23 22:39:01 CDT 2002


Hi Evolter's,

I have a form with three seperate sections.

I have those three sections seperated by lines and the user is to pick one
section to fill out depending on their choice.

I would like to disable the other two sections that are not selected.
Sections are picked by a radio button at the top of each one.

For example (sorry for the bad ASCII art):

--------
o Radio A
  --INPUT 1a
  --INPUT 2a
  --INPUT 3a
--------
o Radio B
  --INPUT 1b
  --INPUT 2b
  --INPUT 3b
--------
o Radio C
  --INPUT 1c
  --INPUT 2c
  --INPUT 3c

If the user is choosing Radio B, I want everything in group "A" and "C" to
be disabled and likewise for each group.

I googled around for some javascript tricks to do this but the closest I
found was:
http://www.simplythebest.net/info/javascript24.html

Unfortunatly, I am not a javascript guru and am not able to tailor that to
my needs.  I was able to get Matt Kruse's scripts working fine thanks to
his great documentation in the code but I am by no means a javascript
coder.

If anyone has any tips or a premade library I could get some help from or
use, that would be great.

Thanks
David Ulevitch
--
"Never doubt that a small group of thoughtful citizens can change the
world. Indeed, it is the only thing that ever has." --Margaret Mead





More information about the thelist mailing list