Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6892703
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T06:34:06+00:00 2026-05-27T06:34:06+00:00

I may be misunderstanding the correct usage of this function, but I believe appendChild

  • 0

I may be misunderstanding the correct usage of this function, but I believe appendChild is working incorrectly in Firefox. I have a very large script that has worked fine in IE since version 6. We’re now trying to make this script work in all browsers, so I’m starting to test in FF.

Here’s some relevant lines from the script, modified for easier reading here:

var tempDocFragment = document.createDocumentFragment();
var tempNewtbody = document.createElement("tbody"); 
trElem = document.createElement("tr");
tdElem = document.createElement("td");

trElem.appendChild(tdElem);
tempDocFragment.appendChild(trElem);
tempNewtbody.appendChild(tempDocFragment);
mytable.appendChild(tempNewtbody);

Code like the above runs within a loop that adds between 0 and 1000+ table rows to a table. This all appears to work fine and the table rows appear in the table. However, the table rows have an onmouseover event that runs this line of code:

alert(this.parentElement);

This returns ‘undefined’ in Firefox, but returns the proper parentElement on IE. So it appears that Firefox is running the code to append the child elements correctly, but somehow fails to associate any parent with those child elements. I would appreciate any insight into what I may be doing wrong.

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T06:34:06+00:00Added an answer on May 27, 2026 at 6:34 am

    parentElement is not supported in Firefox < 9. It started life as a non-standard property of elements in IE 4 and has relatively recently been standardized in DOM4.

    Use parentNode instead.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

(very newbie questions) i may be misunderstanding this but on MSDN i believe it
I may be greatly misunderstanding this threading scenario, but that's why I'm asking. What
I may have a misunderstanding but I was under the impression that having a
This may be a case of me just misunderstanding what I've read, but all
I think I may have a misunderstanding of <xsl:variable\> and <xsl:value-of\> so perhaps someone
I suspect I may be wording this question incorrectly (it’s been a while since
I'm may be just misunderstanding something fundamental here but... Senario: I call System.Net.Sockets.NetworkStream 's
I may be misunderstanding their use or misread the documentation, but how do I
I may be misunderstanding how <include> and <merge> work, but according to Simple example
I may have some misunderstanding regarding the use of the UINavigationControllerDelegate protocol. Here is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.