I'm creating a table with Javascript so in a loop there's
if (formFieldData == 'cleanSlate')
{
document.getElementById('productsTable').innerHTML = '';
// clears what was there before, so we're left with an empty <table>
} else
{
document.getElementById('productsTable').innerHTML += '<tr></tr>';
}
After a couple of iterations what I'm left with is this .. not sure how to display HTML for you so without the angle brackets: tbody tr /tr /tbody tbody tr /tr /tbody
Why is it inserting those tbodys and how can I stop it doing that?