This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
javascript problem
- From: Paul Kelly <pjkelly5 at rogers dot com>
- To: xsl-list at lists dot mulberrytech dot com
- Date: Wed, 17 Jul 2002 23:15:22 -0400
- Subject: [xsl] javascript problem
- Reply-to: xsl-list at lists dot mulberrytech dot com
My first post so please be gentle :) I looked all through the
archives for an answer.
Can someone please tell me why this script will not execute:
<head>
<xsl:copy-of select="document('meta')/meta" />
<title><xsl:value-of select="page/@title"/></title>
<script language="JavaScript">
{
document.write("<link rel='stylesheet' href='css.css'
type='text/css' />");
}
</script>
</head>
But this one will (it's further down inside the body of the html output):
<script language="JavaScript">
{
document.write("<hr width='10' />");
}
</script>
The first is a browser detect script whittled down to essentials. Can
someone tell me the difference between the two? Is there a better way
to do browser detection? I need to send different css to different
browsers.
Thanks,
Paul
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list