Solved

removeChild at perticular Index

Posted on 2009-04-02
1
316 Views
Last Modified: 2012-05-06
hi guys having problem -  

please help urgen,

ok so i have code below - which works for foo.removeChild(foo.lastChild);

but how do i remove individual child from the parent,

i tried below method but does not work yet

Please help
	function remove(){
		var foo = document.getElementById("fooBar");
		var buttonID = document.getElementById("button0");
		//alert(buttonID);
		foo.removeChild(foo.buttonID);
		//foo.removeChild(foo.lastChild);
		}
 

Open in new window

0
Comment
Question by:montu_12
[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
1 Comment
 
LVL 9

Accepted Solution

by:
Graceful_Penguin earned 500 total points
ID: 24058045
I gave two methods to get the node to remove use the one that works best for you.
function remove()
{
	//var foo = document.getElementById("fooBar");
	//var buttonID = document.getElementById("button0");
	//foo.removeChild(buttonID);
	fooBar.removeChild(button0);
}

Open in new window

0

Featured Post

Independent Software Vendors: 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

After seeing many questions for JRNL_WRAP_ERROR for replication failure, I thought it would be useful to write this article.
In this blog post, we’ll look at how ClickHouse performs in a general analytical workload using the star schema benchmark test.
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

691 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