List Info

Thread: IE removed node retains parent node




IE removed node retains parent node
country flaguser name
United States
2008-03-06 15:18:31

Hi all,

I recently discovered that in IE, when I remove a node from the document
via removeChild, the removed node retains a parentNode, but the
parentNode has no tagName and it has no parentNode. Here's something to
illustrate my point:

<div id="d1"></div>;

<script type=";text/javascript";>

div1 = document.getElementById('d1');

div1.parentNode.removeChild(div1);

alert(div1.parentNode);
alert(div1.parentNode.tagName);
alert(div1.parentNode.parentNode);

&lt;/script&gt;

FF behaves differently (as do other browsers I've tested). I haven't
been able to find any documentation explaining this behavior or any
explanation for it. Does anyone here know where I might find more
information about this?

Thanks,
mata_goliat

In the Seattle WA area and an IT professional? Join SWIPA!
SWIPA - Seattle Washington Internet Professionals Association
<http://tech.groups.yahoo.com/group/swipa/ <../../../../swipa/> >

[Non-text portions of this message have been removed]

__._,_.___
.

__,_._,___
javascript with xml tutorials and book suggestions needed please
country flaguser name
United States
2008-03-07 11:45:29

New projects are fun. Any suggestions please

>
&gt;

__._,_.___
.

__,_._,___
[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )