[Javascript] javascript DOM doubt

David Dorward david at dorward.me.uk
Fri Aug 25 04:59:33 CDT 2006


On Fri, Aug 25, 2006 at 10:47:35AM +0100, suresh kumar wrote:

>       sorry for repeatively asking my doubt.

You should probably have a read of: http://perlmonks.org/?node_id=444996

>    i want to change the tree as
>             <div id='iedisplayarea'>     //parent node  
>                         |
>                 <img id='ashow'>              //child node of iedisplay area
>                         |
>                 <img id='ashow1'>            //child node of ashow

<img> elements cannot have children. The resulting (X)HTML:
  <div><img><img/></img></div>
would be invalid, so what you are asking for doesn't make sense.

I suspect you want the new image to be a sibbling of th existing one,
in which case it should be a child of iedisplayarea, not ashow.

-- 
David Dorward                                      http://dorward.me.uk




More information about the Javascript mailing list