[Javascript] innerHTML in xhtml (was: document.all for NETSCAPE)

Peter-Paul Koch pp.koch at gmail.com
Wed Oct 13 07:13:22 CDT 2004


> > How do you create an application/xhtml+xml page that will work in Mozilla? I just tried it, because I wanted to test this bit of lore, but it doesn't work.
> > See http://www.quirksmode.org/dom/innerhtmltest.xhtml, the MIME type is application/xhtml+xml . Works fine in Opera (and innerHTML works fine, too), but Mozilla only shows it as an XML page, and doesn't seem to interpret the HTML/CSS. What's gone wrong now?
> 
> It does, but you must realise that Mozilla isn't an XHTML1 user agent,
> it's a non-validating XML user agent with knowledge of the XHTML1
> namespace and MIME type. Thus, if the document does not use the XHTML1
> namespace, it won't be treated as XHTML1. And you must use the
> namespace in all XHTML documents anyway, it's required by the DTD.

Sure, sure. But how do I change the page so that it works in Mozilla
while still being application/xhtml+xml? I just want to test whether
innerHTML works or not.

-------------------------------------------------------------------
ppk, freelance web developer
Interactie, copywriting, JavaScript, integratie
http://www.quirksmode.org/ 
------------------------------------------------------------------



More information about the Javascript mailing list