I need your help. I have a dynamic content table with values.
I need these values to be reported in a div to then pass them to the function, as shown in the code below.
.
.
.
Object.entries(results).forEach(item => {
item = item[1];
let child = document.createElement("tr");
child.innerHTML = `
<td>${item.id}</td>
<td><${item.n_a}</td>`;
table.appendChild(child);
document.querySelector('#my-table').appendChild(child);
})
<div class="split left">
<div class="centered">
<table id="my-table" width="90%">
<tr>
<th>Number</th>
<th>Type</th>
</tr>
</table>
<br>
<br>
<div class="buttons">
<form action="save.html">
<input type="submit" value="Add article part" />
</form>
</div>
</div>
</div>
<div class="split right">
<div class="centered">
<br>
<object data="editframe.html?id=${item.id}&n_a=${item.n_a}" width="700" height="500"> </object>
</div>
</div>
I tried as done in the code below but nothing is shown.
Is it possible to do this? If so, how can this be done?