Reply to Re: Script tag bug in Internet Explaorer!

Your name:

Reply:


Posted by Andy Dingley on 05/31/06 10:36

SlimBiker wrote:

> <script type="text/javascript" src="./js/global.js" />

> I am using XHTML 1.0 transitional and page validates to W3C.
> Any idea why this could be???

Well known IE problem.

Don't serve XHTML as XML - the web (and particularly IE) just aren't
ready for it yet. If you must use XHTML, then use Appendix C as well
and serve it as text/html (search the c.i.w.a.h archives for much
discussion of this). Don't try either until you have some understanding
of DTDs.

When generating XHTML for use anywhere near a traditional HTML parser,
then make sure you avoid the XML behaviour of treating elements that
are empty and elements that have no content as equivalent. This isn't
true under SGML or HTML: <script></script> is _different_ to <script />

Only output empty elements (single empty tag) for elements that are
defined to be empty in the HTML DTD, such as <br />, <hr />, <link />
and <meta />. For <script> you MUST ensure that it never appears in
the <script /> form -- if you're using XSLT to generate your pages then
you might need to slip a white space character into it to stop "XML"
output changing it. XSLT doesn't understand Appendix C and can't
generate it automatically.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация