Forum Moderators: open
It doesn't seem to work inside the script tag.
Could someone help me?
<script language="JavaScript1.2">
<!--
if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) < 4 )) {
document.write("<LINK REL=stylesheet HREF=\"ie3.css\" TYPE=\"text/css\">"); }
else if ((navigator.appVersion.indexOf("Mac")!= -1)) {
document.write("<LINK REL=stylesheet HREF=\"mac.css\" TYPE=\"text/css\">"); }
else {
document.write("<LINK REL=stylesheet HREF=\"win.css\" TYPE=\"text/css\">"); }
// -->
<xsl:comment>
<xsl:call-template name="henry"/>
<xsl:text>// </xsl:text>
</xsl:comment>
</script>
Thanks in advance
It should be..
<script type="text/javascript"> See [w3.org...]
The W3C HTML Validator [validator.w3.org] should have told you about this.
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<head>
<script type="text/javascript">
<!--
if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) < 4 )) {
document.write("<LINK REL=stylesheet HREF=\"ie3.css\" TYPE=\"text/css\">"); }
else if ((navigator.appVersion.indexOf("Mac")!= -1)) {
document.write("<LINK REL=stylesheet HREF=\"mac.css\" TYPE=\"text/css\">"); }
else {
document.write("<LINK REL=stylesheet HREF=\"win.css\" TYPE=\"text/css\">"); }
// -->
<xsl:comment>
<xsl:call-template name="henry"/>
<xsl:text>// </xsl:text>
</xsl:comment>
</script>
Also a <!DOCTYPE> is mandatory in XHTML. Which one depends on what you are coding.
Here's the W3C Doctype List [w3.org].
Strange? But it does work now.
Thanks for all of your help. You help lead me in the right direction. Thanks again.