The code is simple:
var td1 = document.createElement("td");
td1.id="td_radio_"+nr_int+"_"+nr_var2;
td1.style.border = "0";
td1.style.width = "5%";
td1.onclick="adaugare_varianta_simplu(\'"+nr_int+"\',\'"+nr_var2+"\');";
but the function doesn't fire when I click the cell; what am I doing wrong? I'm not using bind because later on there's gonna be a removeAttr working on it so I want it set up as an attribute.