Re: cdata, javascript and xhtml1.1

"Jonathan Chetwynd" <j.chetwynd@btinternet.com> wrote in message
news:9CEB7A3E-0057-11D7-9843-0003939B5AD0@btinternet.com...
>
> I'd just as soon have a simple example, with a .htaccess file,
> javascript, css, and an xhtml file.
>
> http://www.peepo.com/alfi-x/music-x/w-x.xhtml
> is my current best effort, which validates at w3.  IE6 and Mozilla both
> want to download this rather than open it.
>
> .htaccess file: AddType text/xhtml+xml xhtml

The correct mime-type is application/xhtml+xml

>
> <meta http-equiv="Content-Type" content="text/xhtml; charset=us-ascii"
> />
> your point about the meta tag is well taken, thanks, a number of other
> respondents missed this:

It's unnecessary, especially in XHTML, where no UA should listen to it
ever.

> document.write('<bgsound src="#" id="mysound" loop="1" />')
> the IE specific javascript bgsound not being quoted, the code is mainly
> cross-browser,

There's no point putting IE specific code in an application/xhtml+xml as
a user would need to modify their IE installation to have it even render
an XHTML document, those few that bother are also likely to modify it in
other ways - IE specific sound can be done more efficiently just in
script with img and dynsrc in any case.

Jim.

Received on Monday, 25 November 2002 05:03:21 UTC