On 31 Dec 2004 12:25:09 -0800, <bu****@hotmail.com> wrote:
How can I emulate DOM level 1 removeChild in IE 4?
With enormous difficulty.
I already figured out to emulate getElementById by doing this
if((!document.getElementById) && document.all)
{document.getElementById = function(id){return document.all[id];};
}
That's an approximation as the all collection will return elements that
match by either id or name, and if there is more than one result a
collection, rather than a single reference, will be returned. Be aware of
that when you're producing your mark-up so that you will only every get
one reference. Alternatively, see the second example at
<URL:http://www.jibbering.com/faq/faq_notes/not_browser_detect.html#bdGEID>.
Is there something similar for removeChild?
You might be able to use the innerHTML property to remove the element,
though that would depend on the parent element in question (IE4 doesn't
implement innerHTML on all elements).
Good luck,
Mike
--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.