[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
RE: [xsl] javascript problem
Subject: RE: [xsl] javascript problem From: "Michael Kay" <michael.h.kay@xxxxxxxxxxxx> Date: Thu, 18 Jul 2002 09:00:24 +0100 |
You haven't actually asked for the script to execute, you have only asked for it to be included in the output of the transformation. If you need to send different CSS to different browsers, I would have thought you needed to detect the browser at transformation-time, so a script that only executes inside the browser isn't going to be much use. Michael Kay Software AG home: Michael.H.Kay@xxxxxxxxxxxx work: Michael.Kay@xxxxxxxxxxxxxx > 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 > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] javascript problem, James Fuller | Thread | Re: [xsl] javascript problem, Thomas B. Passin |
RE: [xsl] Using JavaScript to acces, Michael Kay | Date | Re: [xsl] sending parameters with a, David Carlisle |
Month |