I have table with multiple rows but its row cotain 3 checkbox and button. Now, I want to update db table with respect to this button and the check box. But, the problem is that I am not able to get the value of the check box when I clicked on each rows button. Please find the below code and let me know how can I get the value as per button on each row.
<table width="100%">
<tr class="tbrow">
<td width="12%">
<span class="name">test.html</span>
</td>
<input type="hidden" value="0" class="file_id" />
<td width="5%">
<span class="action">
<input type="checkbox" value="1" class="read" title="read" /> Read
</span>
</td>
<td width="5%">
<span class="action">
<input type="checkbox" value="1" class="write" title="write" /> Write
</span>
</td>
<td width="7%">
<span class="action">
<input type="checkbox" value="1" class="download" title="download" /> Download
</span>
</td>
<td width="5%">
<span class="action">
<input type="checkbox" value="1" class="share" title="share" /> Share
</span>
</td>
<td width="80%">
<span class="action">
<input type="submit" name="assign" class="assign" title="Submit" value="Submit" />
</span>
</td>
</tr>
<tr class="tbrow">
<td width="12%">
<span class="name">testing.doc</span>
</td>
<input type="hidden" value="1" class="file_id" />
<td width="5%">
<span class="action">
<input type="checkbox" value="1" class="read" title="read" /> Read
</span>
</td>
<td width="5%">
<span class="action">
<input type="checkbox" value="1" class="write" title="write" /> Write
</span>
</td>
<td width="7%">
<span class="action">
<input type="checkbox" value="1" class="download" title="download" /> Download
</span>
</td>
<td width="5%">
<span class="action">
<input type="checkbox" value="1" class="share" title="share" /> Share
</span>
</td>
<td width="80%">
<span class="action">
<input type="submit" name="assign" class="assign" title="Submit" value="Submit" />
</span>
</td>
</tr>
</table>
Now, When I click on read check box of first row and click submit, it should pickup this value along with the hidden value of class="file_id" value.
Similary, when I click on submit in second row, it should pickup only those checkbox value in the second row only vice versa.
Please check and help me on the code.
Thanks in advance for your time.
Thanks! Robin