Hi,
I have a template that has several tables, I need to dynamically add
new elements to one of them, however, I'm having a hard time to append
a new element and some space like <br> after that.
Part of the HTML code look like
<table ID="parent">
<tr>
<td>
<table ID="left">
<tr>
<td>Left navigation one</td>
</tr>
...
</table>
</td>
<td>
<table ID="right">
<tr>
<td>Content here</td>
</tr>
...
add new element here
</table>
</td>
</tr>
</table>
FYI, I don't have a problem adding a new element using
document.createElement function, however, as stated, the new element
was appended to the bottom, instead of, it appears to the right of the
last table.
f = document.getElementById('theForm');
more code for new element addition here ...
// add some space
var b = document.createElement('<br>');
f.appendChild(b);
// try the following does not help either
f.appendChild(document.createElement("<tr><td colspan='2'
height='5'></td></tr>"));
it looks like I need to reference the table object instead of FORM
obj for the above, however, I failed to assign a var to the table
object either by ID or name, would greatly appreciate your help.
TIA.