The non-HTML element can be tricked into appearing to be an actual HTML
element if you use:

document.create("fakeElementTagName"); somewhere on the page. Once that's
done, IE will treat <fakeElementTagName>foo-bar</fakeElementTagName> as an
actual DOM element, and you should be able to remove it using regular DOM
helpers. (e.g. parentNode.removeChild, or Prototype's .remove();)

Try it out and let me know.

Best,
Alex

On Tue, Apr 20, 2010 at 10:33 AM, Jelks <jelks.caban...@gmail.com> wrote:

> On Apr 20, 10:08 am, "Jonathan Rosenberg" <j...@tabbysplace.org>
> wrote:
>
> > How about using Xpath from Javascript to find the nodes?  Very simple.
>
> Simple?  How so?  This is not an XML document, this is an HTML page
> that happens to have one non-HTML element in it.  All the other
> browsers add it to the HTML DOM, no problem -- and in those, I can
> easily hide or remove it.  But IE turns that non-HTML element into
> three nodes, the start tag being the first, the text node being the
> second, and end tag the third.  Presumably the three are siblings, but
> I'm guessing there.
>
> So how might I go about removing that text node in an HTML document
> using Xpath from Javascript?
>
> Thanks,
>
> Jelks
>
> --
> You received this message because you are subscribed to the Google Groups
> "Prototype & script.aculo.us" group.
> To post to this group, send email to
> prototype-scriptacul...@googlegroups.com.
> To unsubscribe from this group, send email to
> prototype-scriptaculous+unsubscr...@googlegroups.com<prototype-scriptaculous%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/prototype-scriptaculous?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.

Reply via email to