Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

How to apply <Div> tag just outside <TR> tag ?

what i really want a <DIV> outside <tr>, if this is not possible then is there any alternate to achieve below functionality?

<div>
<tr>
<td> Column 01 </td>
<td> Column 02 </td>
<td> Column 03 </td>
<td> Column 04 </td>
<td> Column 05 </td>
</tr>
</div>
[493 byte] By [nawaz ijaz] at [2007-11-11 10:05:27]
# 1 Re: How to apply <Div> tag just outside <TR> tag ?
Why do you want to put a <tr> inside a <div>? What are you trying to accomplish?
Phil Weber at 2007-11-11 17:23:11 >
# 2 Re: How to apply <Div> tag just outside <TR> tag ?
Why do you want to put a <tr> inside a <div>? What are you trying to accomplish?

hmm... why m i trying this.. please find it here...

http://www.sitepoint.com/forums/showthread.php?t=447508
nawaz ijaz at 2007-11-11 17:24:11 >
# 3 Re: How to apply <Div> tag just outside <TR> tag ?
OK, if I understand correctly, you want to have an empty table on your page and use JavaScript to insert rows dynamically. In order to do this, you need a container into which to insert the rows. Is that correct?

As someone pointed out in the other forum, you may use the <tbody> tag instead of a <div>:

<table>
<tbody id="tablename">
</tbody>
</table>

Now your JavaScript can use getElementById to find "tablename" and insert rows dynamically.
Phil Weber at 2007-11-11 17:25:20 >