www.webdeveloper.com
Results 1 to 2 of 2

Thread: Use the value of name to an html button onclick click function.

  1. #1
    Join Date
    Dec 2007
    Posts
    103

    Question Use the value of name to an html button onclick click function.

    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!

  2. #2
    Join Date
    Nov 2002
    Location
    Baltimore, Maryland
    Posts
    12,279
    Code:
    <input id="btnDone" type="button" value="Done">
        <xsl:attribute name="onclick">
            <xsl:value-of select="@name"/>
            <xsl:text>.click()</xsl:text>
        </xsl:attribute>
    </input>
    “The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
    —Tim Berners-Lee, W3C Director and inventor of the World Wide Web

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles