ASP Error: 70
Description: Permission denied
Source: Microsoft VBScript runtime error
|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: XSL checkbox
----- Original Message -----
From: "Adrian Popescu" <adrian@xxxxxxxxxxxx>
To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx> Sent: Tuesday, May 18, 2004 3:33 PM Subject: Re: XSL checkbox I am newbie in XSL and I search ALL GOOGLE for an example:(( As was said this seems more like an HTML question but you are using xsl:attribute incorrectly. The htnl you need is: <input type="checkbox" onclick="toggleColour(this);"> so your xsl should be (I haven't checked any other stuff): <INPUT> <xsl:attribute name="TYPE">checkbox</xsl:attribute> <xsl:attribute name="VALUE">c1</xsl:attribute> <xsl:attribute name="ONCLICK"> toggleColour(this); </xsl:attribute> <xsl:apply-templates/> Then output the following script block somewhere, as you have with your other block: <script> <![CDATA[ function toggleColour(Element)
{
if (Element.style.backgroundColor == "#ffff00"
{
Element.style.backgroundColor = "#ffffff";
}
else
{
Element.style.backgroundColor = "#ffff00";
}
}
]]>
</script>Now you could put that code into an inline event handler but it would be rather messy :) -- Joe
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








