
February 23rd, 2006, 04:11 PM
|
|
Contributing User
|
|
Join Date: Dec 2003
Posts: 178
Time spent in forums: 1 Day 4 h 8 sec
Reputation Power: 10
|
|
Quote: | Originally Posted by jsKid It may be because the parentNode is not what think.
Code:
// This is what the browser assumes as the table hierachy
// even if you don't include the thead, tbody, or tfoot tags
<table>
<thead>
<tr><th></th></tr>
</thead>
<tbody>
<tr><td></td></tr>
</tbody>
<tfoot>
<tr><th></th></tr>
</tfoot>
</table>
Add ... I'm pretty sure you're going to get TBODY.
Code:
window.alert(insert_press_before_here.parentNode.tagName);
|
Hi,
while you're right about the parentNode of the <tr> element being <tbody> and not <table> I don't think this actually caused the problem in this case. I have changed the names of the variables to match this though.
Thanks,
Geoff
|