This is a part of my code used to add new row to a table. I have problem with compiling the code related to last two TD elements. There is always an error of string literal. Please help me to figure it out.
$( "#content tbody" ).append( "<tr>" +
"<td>" + opr.val() + "</td>" +
"<td>" + flightNum.val() + "</td>" +
"<td>" + from_f.val() + "</td>" +
"<td id=" + flightNum.val() + " class='edit_but'>
<div>
<img src='images/edit.png' alt='Edit' />
</div>
</td>" +
"<td id=" + flightNum.val() + " class='deact_but' onclick="deactivateRow('+flightNum.val()+')">
<div>
<img src='images/delete.png' alt='Deactivate' />
</div>
</td>" + "</tr>" );
Your code is a mess! there are so many quotes (
") missing and string concating (+) missing!After a lot of fixing: