below is my code:
Cell.setAttribute('type', 'checkbox');
Cell.setAttribute('name', "Size");
based on condition I will set some values to 'checked' and 'disabled'.
Cell.setAttribute('checked', 'true');
Cell.setAttribute('disabled', 'true');
Here 'Size' contains some values which are disabled, both unchecked and checked.
So whenever I am trying to retrieve the checked values, the default disabled checked boxes are also being returned.
I just want the checked values; not the disabled checked values in SelectedDetails method:
var testCaseArray =[];
var checkbox = document.getElementsByName('Size');
for(var i=0; i<checkbox.length; i++){
if(checkbox[i].checked){
testCaseArray.push(checkbox[i].value);
}
}
return testCaseArray;