Use a radio box instead of a checkbox. Radio boxes automatically do
what you are trying to do, and have the added advantage of being the
standard way to do it.
On Wed, 9 Mar 2005 16:52:05 +0530, senthil Kumar
<[EMAIL PROTECTED]> wrote:
> Hello all.,
>
> I have a Two Box called admin and lead.
>
> Admin is checked mean lead disabled. admin value is "Y" and lead value is "N"
> When admin is unchecked mean lead should Enabled and vice versa also.
>
> I put my code for your reference, if any one changed and give the idea to me.
>
> Thankd in advance.
>
> regs.,
> Senthil S
>
> <tr>
> <td class="color"><bean:message
> key="systemadminconsol.createuser.admin"/> </td>
> <td>
> <html:checkbox name="AddUserForm" property="isAdmin" value="admin"
> onclick="adminChecked(this)" tabindex="20" />
> </td>
> </tr>
>
> <tr>
> <td class="color"><bean:message
> key="systemadminconsol.createuser.lead"/> </td>
> <td>
> <html:checkbox name="AddUserForm" property="isLead" value="lead"
> onclick="leadChecked(this)" tabindex="20" />
> </td>
> </tr>
>
> function adminChecked(obj){
> if (!obj.checked)
> document.forms[0].isAdmin.value = "N";
> else
> document.forms[0].isAdmin.value = "Y";
> document.forms[0].isLead.disabled ="true";
> }
>
> "leadChecked(this)" this is also vice versa of above method.
>
>
--
Jeff Beal
Webmedx, Inc.
Pittsburgh, PA USA
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]