I have a table in my index.html file
<table id="userTable">
<tr>
<th>UserId</th>
<th>About you</th>
<th>Age Max</th>
<th>Age Min</th>
<th>City</th>
</tr>
</table>
Im using firebase to pull some data down to display it in the table.
snapshot.forEach(snap => {
console.log(snap.val())
var r = document.getElementById('userTable').insertRow().innerHTML = snap.val().username
var x = r.insertCell(1);
x.innerHTML = snap.val().age
})
The firebase logic is working correct, i am able to get the desired fields, but i can't seem to insert the data into a column for that row.
Im getting an error:
TypeError: r.insertCell is not a function. (In 'r.insertCell(1)', 'r.insertCell' is undefined)
The plan is to create a row and then populate the columns with the rest of the data.
rto hold and why?