This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Xsl colour attributes.


Daniel,
I've accomplished much the same as what you're trying to
do.  What, I think, you're missing is the difference
between what is processed at the XSLT level (server side)
and what is processed at the browser level.  
What I did was added styles to the top of the page (browser
processing) and used XSLT to set the style values.  Then,
as the browser's Javascript engine draws the tables the
browser will also apply the styles and voila you have the
colors you want. 





On Mon, 21 May 2001, you wrote:
> I'm trying to contstruct dynamic atbles is a stylesheet using javascript. I can get this to work, the problem is that when I try to set the colour attribute for the table or data fields within it, it doesn't work. Here is a sample bit of code I'm trying to get to work.
> 
> <body scroll = "auto" leftmargin="0" topmargin="0" rightmargin="0" bottommargin="0">
> <SCRIPT>
> <![CDATA[
> document.writeln("<table cellpadding='0' cellspacing='0' border='0' width='100%' height='100%'>")
> document.writeln("<tr>")
> document.writeln("<td>")
> document.writeln("<xsl:attribute name='bgcolor'><xsl:value-of select='$fgcolor' /></xsl:attribute>")
> document.writeln("blah blah ")
> document.writeln("</td>")
> document.writeln("</tr>")
> document.writeln("</table>")
> ]]>
> </SCRIPT>
> 
> </body>
> 
> The table gets drawn, blah blah gets put in, but the table will not display any colours. 
> Any ideas anyone.
> Thanks
> Daniel
> 
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
-- 
Richard Draucker,  richard@protected-data.com
Protected-Data.Com  www.protected-data.com
Remote data support for web developers.









 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]