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

Andrew Gibson andyg at ihug.co.nz
Tue Sep 16 04:53:52 CDT 2003


With IE you can just put disabled=true  I think it is

But you could also I think put a style into the element and then manipulate
with JS.

eg.

<input type=text style="display:none">

or maybe

<div style="display:none">
<input type=text>
</div>

Andrew Gibson



=============================================================

I'd love to hear from anyone who can help me achieve the following:

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.

I searched the archives but didn't see any mention of how to do this.

The page is html 4.1 transitional, using CSS fairly extensively.





More information about the Javascript mailing list