Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #18516
| Newsgroups | comp.lang.javascript |
|---|---|
| Date | 2013-02-16 18:44 -0800 |
| References | <79283e5f-05ae-4848-85fa-fd67dad12b96@googlegroups.com> <07aef4fc-18ba-4918-afd9-b1e5ae24a02b@googlegroups.com> |
| Message-ID | <8ff7bed1-12ea-4b9e-af5b-d29bd2deb520@googlegroups.com> (permalink) |
| Subject | Re: Node removal problem |
| From | justaguy <lichunshen84@gmail.com> |
Problem solved. Key is to use the correct syntax for object click, that is,
object.onclick = function
Thank you all.
>On Saturday, February 16, 2013 8:59:24 PM UTC-5, justaguy wrote:
> Thanks, Sam, but it seems there's some misunderstanding here.
>
>
>
> // 1) the following TR is dynamically created
>
> // 2) the objective is to remove the whole row (TR), not the specific TD
>
> <tr>
>
> <td onclick="this.parentNode.removeChild(this)">
>
> delete me
>
> </td>
>
> </tr>
>
>
>
> >On Saturday, February 16, 2013 1:09:45 PM UTC-5, 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);">
>
> >
>
> > ...
>
> >
>
> > </tr>
>
> >
>
> > </table>
>
> >
>
> > </tbody>
>
> >
>
> > </TABLE>
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll 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