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"/>&nbsp; </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"/>&nbsp; </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.



Reply via email to