[Javascript] greying out checkboxes

Kipp Spanbauer Kipp.Spanbauer at sas.com
Fri Dec 20 08:55:46 CST 2002


Philip:

I had the same question that you did regarding greying out javascript checkboxes and found my answer on a macromedia website:  http://www.macromedia.com/v1/documents/hs4/html_reference/Forms/input.htm

Basically, all you need is the word "DISABLED" in the along with the INPUT tag.  Example:

<input class="formbuttons" DISABLED type="checkbox" name="select" value="mcp">User 
must change password at next login<br>

That should do it for you.

I found your message at:
https://lists.latech.edu/pipermail/javascript/2002-April/003356.html

Thanks,
Kipp Spanbauer
kipp.spanbauer at sas.com




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

Philip Humeniuk's message read as follows:

Hi,

I have the following input boxes in my index.htm file. What I would like to 
happen is if the user checks the box "User must change password at next 
login" I want the "User cannot change password" and "Password never 
expires" checkboxes grayed out and possibly the text also so they cannot 
check those. The only other option to check would be the "Account is disabled"

Can this be easilty done with JS?



<input class="formbuttons" type="checkbox" name="select" value="mcp">User 
must change password at next login<br>
<input class="formbuttons" type="checkbox" name="select" value="ccp">User 
cannot change password<br>
<input class="formbuttons" type="checkbox" name="select" 
value="pne">Password never expires<br>
<input class="formbuttons" type="checkbox" name="select" value="ad">Account 
is disabled









More information about the Javascript mailing list