[Javascript] Re: Checkboxes

Peter-Paul Koch gassinaumasis at hotmail.com
Wed Apr 17 09:38:53 CDT 2002


>From: phumes1 <phumes1 at rogers.com>
>Reply-To: javascript at LaTech.edu
>To: javascript at LaTech.edu
>Subject: [Javascript] Re: Checkboxes
>Date: Wed, 17 Apr 2002 10:36:01 -0400
>
>
>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"

So basically you want only *one* of the checkboxes to be checked at any 
time. In that case you have to use radio buttons which are meant especially 
for this purpose.

<INPUT TYPE="radio" NAME="passwordstatus" VALUE="change">
<INPUT TYPE="radio" NAME="passwordstatus" VALUE="cannotchange">
<INPUT TYPE="radio" NAME="passwordstatus" VALUE="neverexpires">
<INPUT TYPE="radio" NAME="passwordstatus" VALUE="disabled">

ppk

_________________________________________________________________
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx




More information about the Javascript mailing list