?
Solved

removeChild() not working in IE

Posted on 2006-10-31
2
Medium Priority
?
531 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 41

Accepted Solution

by:
HonorGod earned 200 total points
ID: 17841595
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
This article discusses how to implement server side field validation and display customized error messages to the client.
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…
Suggested Courses

770 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