469,272 Members | 1,569 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,272 developers. It's quick & easy.

Table DOM in Mozilla Vs. IE.

dmjpro
2,476 2GB
Have a look at my code snippet ...
Expand|Select|Wrap|Line Numbers
  1. function add_row(){
  2.  var tr = some_reference;
  3.  document.getElementById('tab_id').appendChild(tr);
  4. }
  5.  
Expand|Select|Wrap|Line Numbers
  1. <table id=tab_id>
  2. <tr id=tr_id>....</tr>
  3. .....
  4. </table>
  5.  
It works in Mozilla but not in IE.
If i do
Expand|Select|Wrap|Line Numbers
  1. document.getElementById('tr_id').parentNode.appendChild(tr);
,
now it works in both :-)
Could you explain why this happens ..experts ?
Aug 27 '08 #1
4 1198
acoder
16,027 Expert Mod 8TB
In IE, you need to append to the tbody rather than the table. See this part-article.
Aug 27 '08 #2
dmjpro
2,476 2GB
In IE, you need to append to the tbody rather than the table. See this part-article.
Yeah i know that's why i knocked the experts ;)
One more thing now a days are you busy ? I thrown a discussion over the core topics ..functions and objects, you didn't take part in that
i expected you to throw something ...... ;)
Aug 27 '08 #3
acoder
16,027 Expert Mod 8TB
I did see that thread, but didn't participate in it. Some of the concepts I needed to figure out for myself before I could contribute, but I think it's resolved now.
Aug 28 '08 #4
dmjpro
2,476 2GB
I did see that thread, but didn't participate in it. Some of the concepts I needed to figure out for myself before I could contribute, but I think it's resolved now.
Oh ...Sure man.
yeah it's now got figured out .....for myself ...
really thanks to Bytes.com experts team from here i came 2 know lot of details ..Java as well as JavaScript ;)

Basically i am also interested in C and C++ which are my heart ;) ...but i could not find out time to take part in those discussions ....
A lot of pressure in my work ...;(
Aug 28 '08 #5

Post your reply

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

Similar topics

4 posts views Thread by David Ross | last post: by
1 post views Thread by patelbrijeshn | last post: by
7 posts views Thread by Johnny | last post: by
1 post views Thread by CARIGAR | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.