Sunday, 29 September 2013

the disabled checkbox gets functioned when clicking on its row

the disabled checkbox gets functioned when clicking on its row

. .On click button the checkbox gets disabled, but i have also added a
function for getting checked or unchecked when clicked on row. .but the
problem is after clicking the button the checkbox gets disabled but when i
click the row . . .it gets unchecked. I have added the code in JSfiddle.
.its not functioning at all.I dono much in .js.So please help me
this is the code
function selectRow(row){
var firstInput = row.getElementsByTagName('input')[0];
firstInput.checked = !firstInput.checked;
if(firstInput.disabled==false &&
firstInput.checked==true){firstInput.checked =true;}
else if(firstInput.disabled==true){firstInput.checked=true;}}
html code is
in js fiidle
jsfiddle

No comments:

Post a Comment