GreyWyvern wrote:
> And lo, Blinky the Shark didst speak in alt.www.webmaster:
>> Blinky the Shark wrote:
>>> GreyWyvern wrote:
>>>
>>>> There is, of course, a third option which I have forgotten, and that
>>>> is to use an external javascript file.
>>>>
>>>>
>>>> <script type="text/javascript" src="writehr.js"></script>
>>>>
>>>> In file: writehr.js document.write("<hr />" + "Today's alleged
>>>> Yogi-ism:");
>>>>
>>>>
>>>> Although the same caveat about document.write() not working when using
>>>> the text/xml or application/xhtml+xml MIME-types still applies.
>>>
>>> Thanks. I think I will play with this rather than rewriting the whole
>>> site or giving up.
>>
>> Uh. Wait. So you're saying that this still won't validate unless I
>> rewrite the site?
>
> In a "real" XHTML document, parsed by the XML parser, document.write()
> won't work; but parsed as text/html, it will. Moving the statement to an
> external file will allow your document to validate mainly because the
> validator only considers one file at a time. An external JS file does not
> have to follow any XML rules, instead it is only affected by the MIME-type
> of the parent document. eg. certain methods are disabled as explained
> earlier.
Thanks. In the meantime, I did move to an external file and all's well.
Thanks a lot, for a lot of typing.
> I still think it would be best for you to switch back to HTML 4.01, though
>
Then you won't have to worry about any of this.
I understand.
--
Blinky RLU 297263
Killing all posts from Google Groups
The Usenet Improvement Project:
http://improve-usenet.org <----------- New Site Aug 28