I've a checkbox as mentioned below.
<table>
<tr>
<td>
<input type='checkbox' name='testing1' value='testing1' onclick='javascript: testingFunction(this.checked,'testing1');'>
</td>
<td>
<input type='text' name='tesing1_qty' id='testing1_qty' class='inputtext' readonly=''>
</td>
</tr>
</table>
I want to enable the textbox once the checkbox is selected.
I've used a function as below.
function testingFunction(checkboxStatus,checkboxValue){
if(checkboxStatus==true){
$("#"+checkboxValue+"_qty").attr('readonly', false);
}
}
But i'm getting a syntax error. I'm not sure where I go wrong. Please help me on this. Thanks in advance