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

Peter-Paul Koch pp.koch at gmail.com
Wed Oct 13 04:23:46 CDT 2004


> Note: Moz supports the MS-proprietary innerHTML but *only* in pages
> served as mime-type "text/html"; in XHTML pages served properly as
> "application/xhtml+xml", innerHTML will *not* work.

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?

Finding a doctype was tricky, too (<!DOCTYPE html PUBLIC "-//W3C//DTD
XHTML 1.0 Strict//EN"> was not good enough, Moz and Op complained
about the last bracket).

I can understand why no one creates such pages. 
 
-------------------------------------------------------------------
ppk, freelance web developer
Interactie, copywriting, JavaScript, integratie
http://www.quirksmode.org/ 
------------------------------------------------------------------



More information about the Javascript mailing list