[Javascript] Disable or "grey out" fieldsets in a form

Peter-Paul Koch gassinaumasis at hotmail.com
Tue Sep 16 06:24:21 CDT 2003


>I'm building a large membership form, but based on the membership type I
>want to control what fields are input capable.
>
>The form consists of three fieldsets. The first set is always required,
>and the other two should initially be "grayed out".
>
>If the user checks a check  box to request additional services, then the
>other two fieldssets should become active. Uncheck and they become
>grayed out.

http://www.digital-web.com/features/feature_2003-05b.shtml describes my 
script to do this even better. It doesn't gray out form fields, it entirely 
removes them until the user requests them by, for instance, clicking on a 
checkbox.

Works in all modern browsers and is VERY easy to implement.

-------------------------------------------------------------------
ppk, freelance web developer
Interaction, copywriting, JavaScript, integration
http://www.xs4all.nl/~ppk/
Column "Keep it Simple": http://www.digital-web.com/columns/keepitsimple/
New: Browser Wars II: The Saga Continues
http://evolt.org/article/rdf/25/60181/
------------------------------------------------------------------

_________________________________________________________________
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. 
http://join.msn.com/?page=features/virus




More information about the Javascript mailing list