for(var i=0;i<Result.length;i++){
$('<tr>').appendTo('#resultstable');
for(var j=0;j<tableID.length;j++){
$('<td>' + Result[i][tableID[j]] + '</td>').appendTo('#resultstable');
}
$('</tr>').appendTo('#resultstable');
When trying to display a table from JSON data, it displays the headers correctly (not shown here), but when I want the data to show on a new row, it doesn't work. The first row of data is shown correctly, but what should be on the second row continues on from the end of the first row.
In the HTML (when loaded), it shows it as:
..Table headers..
<tbody>
<tr></tr>
</tbody>
<td>1</td>
...Rest of cell data is put in <td> tags...