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
Solved

removeChild at perticular Index

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article describes my battle tested process for setting up delegation. I use this process anywhere that I need to setup delegation. In the article I will show how it applies to Active Directory
Giving access to ESXi shell console is always an issue for IT departments to other Teams, or Projects. We need to find a way so that teams can use ESXTOP for their POCs, or tests without giving them the access to ESXi host shell console with a root …
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

840 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