Subject: RE: [xsl] How to get the value selected by the User From: "Hunsberger, Peter" <Peter.Hunsberger@xxxxxxxxxx> Date: Thu, 7 Mar 2002 12:42:03 -0600 |
> I am displaying a dynamically created xml file in an aspx page. > The xml file contains the dates of the current week.When the User clicks on one of the dates,I want to > get that value in the aspx page. > Currently, I am trying to set an attribute value, at the OnClick of the date element through an > msxsl:script function.But it doesn't seem to be going into that function. I believe you are confusing XML extensions with JavaScript functions? Just output the script as part of the <head> section, and call it without a name space as you would in any normal HTML page... Here's a modified version of your XSL: <?xml version="1.0" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:DateSelect="urn:my-scripts"> <xsl:variable name="Seldate" /> <xsl:template match="/"> <html> <head> <![CDATA[ Public Function fEnterTimeDetails(byval dt_sel as Date) seldate = dt_sel msgbox("Hello") return seldate End Function ]]> </head> <body BgColor="FFAAAA"> <xsl:apply-templates /> </body> </html> </xsl:template> <xsl:template match="DateList"> <table cellpadding="6" cellspacing="1"> <th ColSpan="2"> <font color="purple">Select a Date</font> </th> <xsl:for-each select="Day"> <tr> <td width="100"> <font color="blue"> <xsl:value-of select="@Name" /> </font> </td> <td Align="Right"> <font color="green"> <xsl:attribute name="style">cursor=hand</xsl:attribute> <xsl:attribute name="OnClick">"fEnterTimeDetails('<xsl:value-of select="." /><xsl:text></xsl:text>')"</xsl:attribute> <xsl:value-of select="." /> <xsl:text></xsl:text> </font> </td> </tr> </xsl:for-each> </table> </xsl:template> </xsl:stylesheet> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] How to get the value sele, Bryan Rasmussen | Thread | RE: [xsl] How to get the value sele, Hunsberger, Peter |
[xsl] How to get the value selected, Deepa D | Date | Re: [xsl] word wrap in a text strin, ajay sinha |
Month |