I am using TaffyDB to collect data and display as table rows. But the table rows don’t show as rows underneath one another. The text content of the rows start immediately after the previous text. How do I make the tr rows one under the other?
This is the output div:
// construct and target the output19701979 innerHTML div id
var output = document.getElementById('output19701979');
The opening table info is here:
// will write the innerHTML to here . appears once at top:|
output.innerHTML="<br>To view details of a vehicle, scroll down and click on the year of the vehicle. <table>;|"
Then the repeating info is printed:
// REPEATING ELEMENTS -- part listing of rows
db({filter1:show2}).each(function (name2){ // 'show2' and filter1: "19701979" "name2" is an alias
var yearHistory = name2.yearHistory; // like 1970
var partNo = name2.partNo; // part no in listing row
var partName = name2.partName; // part name in listing row
output.innerHTML+="<tr><td>" + yearHistory + " | " + partNo + " | <strong>" + partName + "</strong></td></tr>";
});
Then the closing table tag:
output.innerHTML+="</table>";
} // must encompass above code.