Click to See Complete Forum and Search --> : Use the value of name to an html button onclick click function.


ISMAILC
10-15-2009, 06:05 AM
Good day,

I need to use the value of the name to an html button onclick click function.

<xsl:element name="asp:CheckBox">
<xsl:attribute name='id'><xsl:value-of select='@name' /></xsl:attribute>
<xsl:attribute name='runat'>server</xsl:attribute>
</xsl:element>

<input id="btnDone" type="button" value="Done" onClick="@name.click();">

I want to onclick the button click the checkbox.
This does not work onClick="@name.click();"
but say the id of the checkbox = Test then onClick="Test.click();" works

Please help!

Charles
10-15-2009, 12:13 PM
<input id="btnDone" type="button" value="Done">
<xsl:attribute name="onclick">
<xsl:value-of select="@name"/>
<xsl:text>.click()</xsl:text>
</xsl:attribute>
</input>