
Where is the mistake? If s = 'asdfasdf', then inserts without problems, but does not want to. Here is the code:
function add() { n_i--; i2=n_i+1; id_='stroka_'+n_i; alert(id_); var s ='<tr id="stroka_'+i2+'"> <td style="border-bottom:inherit"><input type="checkbox" name="checkbox" id="checkbox" /></td> <td align="center" id="family'+id+'" onclick="redact(\'family'+id+'\',\''+id+'\')">'+family_y+'</td> <td align="center" id="name'+id+'" onclick="redact(\'name'+id+'\','+id+')">'+name_y+'</td> <td align="center" id="otchestvo'+id+'" onclick="redact(\'otchestvo'+id+'\','+id+')">'+otchestvo+'</td> <td align="center" id="family_y'+id+'" onclick="redact(\'family_y'+id+'\','+id+')"></td> <td align="center" id="name_y'+id+'" onclick="redact(\'name_y'+id+'\','+id+')"></td> <td align="center" id="opisanie'+id+'" onclick="redact(\'opisanie'+id+'\','+id+',0,true)"></td> <td align="center" id="god'+id+'" onclick="redact(\'god'+id+'\','+id+')"></td> <td align="center" id="mesto'+id+'" onclick="redact(\'mesto'+id+'\','+id+')"></td> <td id="delete_"'+id+' class="delete" onclick="delete_('+id+',this);" onmouseover="this+style+cursor=\'pointer\'"><hr width="20px"></td> </tr>'; $('#'+id_).before(s); n_i=n_i+2; }