I'm currently developing a web application that populates a table (using the dynatable jquery plugin) using json.
One of my needs is to bind a checkbox to a particular column (email) and to be able to retrieve a list of selected addresses and convert them into a comma separated string.
I create the checkbox using :
$(".sth:nth-child(5)").prepend("<input type='checkbox' name='mailcheck' id='cbe'> ");
where sth is a class assigned to every td.
but have no idea how to proceed, i've tried creating an onclick event but i do not know how to bind the event to the control.
Anyone got some ideas?
Thanks in advance!
<td class="sth" style="text-align: left;" abp="61"><input name="mailcheck" id="cbe" onclick="ocEvent()" type="checkbox" abp="62"> [email protected]</td>