-5
rated 0 times
[
1]
[
6]
/ answers: 1 / hits: 22395
/ 11 Years ago, thu, august 29, 2013, 12:00:00
I have an HTML table where there is a checbox and a textbox in everyrow. The idea here is every time a checkbox is checked, the textbox will be disabled. Here is the code:
<table>
<tr>
<td>Value1</td>
<td>Value2</td>
<td><input type=text class=textbox /></td>
<td><input type=checkbox class=Blocked onclick=myFunction(this)/></td>
</tr>
</table>
<script src=/Scripts/jquery-1.7.1.js></script>
<script type=text/javascript>
function myFunction(chk) {
//disable the textbox here
}
</script>
Can you help me with this? Also, if I unchecked the checbox, I want my textbox to be enabled back. Thanks!!
More From » jquery