+ Start a Discussion

how to disable checkbox field checkbox

if i check one checkbox in checkbox field how to disable another checkbox field checkbox? i wrote this code but not working

please corect it.


  function disable(Id1,Id2)
 var  x =document.getElementById("Id1");
 var  y = document.getElementById("Id2");
  for ( var i=0; i <x.length; i++){
  if (x[i].checked =true)
  y[i].disabled ='true';


You'll need to use the $Component notation to locate the element that you want to delete.


Check out: