We're talking about XHTML 1.1 actually being served as application/xml+xhtml. The browser is parsing the XHTML document using the XML parser, and .innerHTML is an invalid attribute/DOM property in XHTML. While it may be valid in HTML 5.0, it is not valid and generates an error when the browser uses its XML parser. So yes, felgall is right.
1. If you reply to my post, and your reply would then appear directly beneath my post, DON'T QUOTE MY ENTIRE POST!!! IT'S REDUNTANT!!! IT'S ASININE!!!! IT'S REDUNDANTLY ASININE!!!!! DON'T DO IT!!!!
3. Use the [code][/code] tags. Otherwise, you may be left wondering why no one responded to your eyesore of a thread.
Does anyone here have a link to a tutorial on the correct xhtml method for doing innerHTML rewrites?
For example, if you could make a call like someDiv.innerHTML = '<p>look! invalid-ness!';, that would invalidate your document and break the page which has already rendered. To get around the lack of innerHTML however, DOM methods such as createElement() and createTextNode() do the trick. A bit more verbose, but valid under this XML-typed document.
Here are some examples on how to create content using createElement and createTextNode:
You can't serve XHTML 1.1 as HTML, it has to be served as XHTML and so you must use createElementNS() to add elements to the page.
HTML supports both document.write (before the page finishes loading) and innerHTML neither of which are supported by XHTML.
The HTML 5 standard is at least 10 years away from being implemented and so unless you are involved in the actual discussions on what it should include there is no reason for taking that version into consideration yet