Solved

removeChild at perticular Index

Posted on 2009-04-02
1
309 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
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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Owning a franchise can be the dream of a lifetime. It provides a chance for economic growth. You can be as successful as you want.  To make your franchise successful, you need to market it successfully. Here are six of the best marketing strategies …
Moving applications to the cloud or switching services to cloud-based ones, is a stressful job.  Here's how you can make it easier.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

744 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

11 Experts available now in Live!

Get 1:1 Help Now