Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #18503

Re: Node removal problem

Date 2013-02-16 19:29 +0100
From Martin Honnen <mahotrash@yahoo.de>
Organization Liberty Development
Newsgroups comp.lang.javascript
Subject Re: Node removal problem
References <79283e5f-05ae-4848-85fa-fd67dad12b96@googlegroups.com>
Message-ID <511fd01b$0$6552$9b4e6d93@newsspool4.arcor-online.net> (permalink)

Show all headers | View raw


justaguy wrote:
> Hi,
>
> I attempted to remove a child inside many layers of a big TABLE but I received an error, err msg:
> "NotFoundError: Node was not found"
>
> Here's the TABLE structure (I know it's messy...).
> I've also tried different parent element/node such as the very top one of id,'TBL' still to no avail.  What's the correct syntax for it.  Thanks.
>
> Nodes layer (inside TABLE)
> <TABLE id="TBL">
> 	<tbody id='TB">
> 		<table id="Content">
> 			<tr id="row1">
> 				<td id="del1" onclick="var PE=document.getElementById('Content'),c=document.getElementById('del1');PE.removeChild(c);">
> 				...


I would simply use
   <td onclick="this.parentNode.removeChild(this);">...</td>
to remove the "td" element node from its parent "tr" element node.

Whether it is a good idea to remove a single cell from a table is 
another issue.

Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Node removal problem justaguy <lichunshen84@gmail.com> - 2013-02-16 10:09 -0800
  Re: Node removal problem Martin Honnen <mahotrash@yahoo.de> - 2013-02-16 19:29 +0100
    Re: Node removal problem justaguy <lichunshen84@gmail.com> - 2013-02-16 10:37 -0800
      Re: Node removal problem justaguy <lichunshen84@gmail.com> - 2013-02-16 10:44 -0800
      Re: Node removal problem Martin Honnen <mahotrash@yahoo.de> - 2013-02-16 19:46 +0100
        Re: Node removal problem justaguy <lichunshen84@gmail.com> - 2013-02-16 11:10 -0800
          Re: Node removal problem justaguy <lichunshen84@gmail.com> - 2013-02-16 13:25 -0800
            Re: Node removal problem SAM <stephanemoriaux.NoAdmin@wanadoo.fr.invalid> - 2013-02-18 14:56 +0100
              Re: Node removal problem "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2013-02-18 22:05 +0100
        Re: Node removal problem Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-02-16 23:05 +0100
          Re: Node removal problem justaguy <lichunshen84@gmail.com> - 2013-02-16 14:44 -0800
            Re: Node removal problem Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-02-16 23:51 +0100
  Re: Node removal problem justaguy <lichunshen84@gmail.com> - 2013-02-16 15:19 -0800
  Re: Node removal problem SAM <stephanemoriaux.NoAdmin@wanadoo.fr.invalid> - 2013-02-17 02:46 +0100
  Re: Node removal problem justaguy <lichunshen84@gmail.com> - 2013-02-16 17:59 -0800
    Re: Node removal problem justaguy <lichunshen84@gmail.com> - 2013-02-16 18:44 -0800
      Re: Node removal problem justaguy <lichunshen84@gmail.com> - 2013-02-16 19:08 -0800
        Re: Node removal problem justaguy <lichunshen84@gmail.com> - 2013-02-16 19:54 -0800
        Re: Node removal problem SAM <stephanemoriaux.NoAdmin@wanadoo.fr.invalid> - 2013-02-18 14:41 +0100
    Re: Node removal problem SAM <stephanemoriaux.NoAdmin@wanadoo.fr.invalid> - 2013-02-18 13:07 +0100
      Re: Node removal problem "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2013-02-18 14:29 +0100
        Re: Node removal problem "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2013-02-18 14:36 +0100
          Re: Node removal problem SAM <stephanemoriaux.NoAdmin@wanadoo.fr.invalid> - 2013-02-18 15:13 +0100
        Re: Node removal problem SAM <stephanemoriaux.NoAdmin@wanadoo.fr.invalid> - 2013-02-18 15:05 +0100
          Re: Node removal problem "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2013-02-18 22:01 +0100

csiph-web