#4542 closed bug (invalid)
[IE] table not 'setting' tbody properly when using .html on it.
Reported by: | Christianh | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 1.4 |
Component: | core | Version: | 1.3.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
For some reason in Internet Explorer (6,7 & 8) trying to set a table contents with .html doesn't work, this results in a empty table, However this does work in Firefox.
Example: html: <table id="test_id"></table>
js: $('#test_id").html("<tr><td>test</td></tr>");
-- I did find a fix by changing the js to: $('#test_id").children('tbody').html("<tr><td>test</td></tr>");
But now it doesn't work in firefox, however I did fix it by changing my html to: <table id="test_id"><tbody></tbody></table>
I expected .html to add a <tbody> to a table if it doesn't exists and set the <tbody> to the html value defined.
Change History (3)
comment:1 Changed 14 years ago by
Component: | web → core |
---|---|
Owner: | joern deleted |
comment:2 Changed 14 years ago by
comment:3 Changed 13 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
You can't append a tr to a table. Tables can have multiple tbody tags. Although the innerHTML implementation of some browsers may try to create a valid tree by inserting tags for you, it is better to be specific.