473,395 Members | 1,977 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes and contribute your articles to a community of 473,395 developers and data experts.

Browser Quirk: Dynamically appended table does not appear on page (IE)

acoder
16,027 Expert Mod 8TB
Problem
The table, when appended dynamically, does not appear on the page.

Browser
Internet Explorer

Example
The Javascript code:
Expand|Select|Wrap|Line Numbers
  1. var obj = document.getElementById("someObjectID");
  2. var table = document.createElement("table");
  3. var tr = document.createElement("tr");
  4. var td = document.createElement("td");
  5. ...
  6. tr.appendChild(td);
  7. table.appendChild(tr);
  8. obj.appendChild(table);
Solution
Add a tbody element and append the table row to the tbody:
Expand|Select|Wrap|Line Numbers
  1. var obj = document.getElementById("someObjectID");
  2. var table = document.createElement("table");
  3. var tbody = document.createElement("tbody");
  4. var tr = document.createElement("tr");
  5. var td = document.createElement("td");
  6. ...
  7. tr.appendChild(td);
  8. tbody.appendChild(tr);
  9. table.appendChild(tbody);
  10. obj.appendChild(table);
More Bugs, Quirks and Inconsistencies
Aug 18 '07 #1
0 6910

Sign in to post your reply or Sign up for a free account.

Similar topics

12
by: Javier | last post by:
Hello, I'm very new in this forum and as I have the following problem, the website is in http://new.vanara.com ----------------------------------------------------------------------------...
13
by: Kai Grossjohann | last post by:
It seems that Ctrl-N in Mozilla opens a new empty browser window. That's fine, I don't need to do anything about it. But Ctrl-N in IE appears to clone the current window. Is there a way to...
12
by: Kepler | last post by:
How do you get the height of the client browser in IE? Both document.body.clientHeight and document.body.offsetHeight return the height of the document. If the page is long and there's a vertical...
4
by: Bas Groeneveld | last post by:
I am developing an ASP.NET application part of which consists of a data entry wizard defined by entries in a data table - ie the controls on each page of the wizard are determined by definitions in...
2
by: David Jones | last post by:
With an ASP page you can add a webform textbox and button (ie not HTML ones) an cause something to be appended to the textbox everytime the button is presssed because the textbox Enableviewstate...
9
by: rajasekhar | last post by:
Hallo, I am developing a site, and here whats the problem is: how to partition the code, i.e. if I developed 1000 lines of code, in that I want to show first 200 lines only if the user opens my...
9
acoder
by: acoder | last post by:
Don't you just hate it when you've got something working in every browser (that you've tested on) except the XYZ browser? It would be a good idea to document some strange or incorrect behaviours...
0
acoder
by: acoder | last post by:
Problem Dynamically appended checkbox element does not appear checked despite setting the checked property state to true or "checked". Browser Internet Explorer Example The Javascript code:...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.