Hi, I don't know xslt - i just need a modification done to existing xslt file.
At the moment the page has 2 radio buttons with a submit button, which exeutes the code dependant on the radio option selected.
Can anyone please help: I want to convert this to two buttons:
<!-- This is the original code -->
<xsl:if test="$cTrigger > '1'">
<xsl:for-each select="Activity/ObjectGroup[@type='trigger']/Object">
<xsl:element name="asp:RadioButton">
<xsl:attribute name='id'><xsl:value-of select='@name' /></xsl:attribute>
<xsl:attribute name='runat'>server</xsl:attribute>
<xsl:attribute name='GroupName'>triggers</xsl:attribute>
<xsl:if test="Value[. = 'on']">
<xsl:attribute name='Checked'>True</xsl:attribute>
</xsl:if>
</xsl:element>
</xsl:for-each>
</xsl:if>
<xsl:if test="$cTrigger > '0'">
<xsl:element name="asp:Button">
<xsl:attribute name="id">___Submit</xsl:attribute>
<xsl:attribute name="runat">server</xsl:attribute>
<xsl:attribute name="text">Submit</xsl:attribute>
<xsl:attribute name="CommandName">Submit</xsl:attribute>
</xsl:element>
</xsl:if>
This is what I tried, by setting the value of ( test="Value[. = 'on']" ) onClick
<xsl:if test="$cTrigger > '1'">
<xsl:for-each select="Activity/ObjectGroup[@type='trigger']/Object">
<xsl:element name="asp:Button">
<xsl:attribute name='id'><xsl:value-of select='@name' /></xsl:attribute>
<xsl:attribute name="onClick">
<xsl:test="Value[. = 'on']"></xsl:test>
<xsl:attribute name='Checked'>True</xsl:attribute>
</xsl:attribute>
<xsl:attribute name="runat">server</xsl:attribute>
<xsl:attribute name="text">Submit</xsl:attribute>
<xsl:attribute name="CommandName">Submit</xsl:attribute>
</xsl:element>
</xsl:for-each>
</xsl:if>
Please help converting this as i'm not sure what i'm doing but i'm trying to set the "test" value.
Regards