Solved

removeChild() not working in IE

Posted on 2006-10-31
2
517 Views
Last Modified: 2012-06-27
Hi, I have some elements which I have added using createElement() from a button event handler. I also have another button so that I can remove the elements which I have added, but although it worked in Firefox and Opera, both IE 6 and 7 won't do it.

HTML:
<div id="container">
<table id="table">
  <tr id="tr1">
    [......]
  </tr>
  <tr id="tr2"><!--This and its children created using createElement()...-->
    [......]
  </tr>
<table>
</div>

JS:
function remove_elem() {
  var elemid = document.getElementById('tr2');
  elemid.parentNode.removeChild(elemid);
}

Many Thanks, Adam.
0
Comment
Question by:madscientist
2 Comments
 
LVL 41

Accepted Solution

by:
HonorGod earned 50 total points
ID: 17841595
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

In Part 1 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7849-Hex-Maze.html) we covered the hexagonal maze basics -- how the cells are represented in a JavaScript array and how the maze is displayed.  In this part, we'…
Having worked on larger scale sites, we found out that you are bound to look at more scalable solutions to integrating widgets, code snippets or complete applications and mesh them into functional sites, in any given composition. To share some of…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now