Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 15th, 2009, 07:01 AM
Friend of Wrox
 
Join Date: Jan 2007
Posts: 115
Thanks: 2
Thanked 0 Times in 0 Posts
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!
 
Old October 15th, 2009, 07:19 AM
samjudson's Avatar
Friend of Wrox
 
Join Date: Aug 2007
Posts: 2,128
Thanks: 1
Thanked 189 Times in 188 Posts
Default

onClick="{@name}.click();">
__________________
/- Sam Judson : Wrox Technical Editor -/

Think before you post: What have you tried?
The Following User Says Thank You to samjudson For This Useful Post:
ismailc (October 15th, 2009)
 
Old October 15th, 2009, 07:28 AM
Friend of Wrox
 
Join Date: Jan 2007
Posts: 115
Thanks: 2
Thanked 0 Times in 0 Posts
Wink

Thank You, Thank You, Thank You :)

I struggled for 2 days & then decided to post.

It works - all that time wasted

Thank You
 
Old October 15th, 2009, 08:53 AM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

>It works - all that time wasted

I would go mad, I think, if I treated time spent solving problems as time wasted. You can't treat the avenues that led nowhere as less productive than the avenues that led to the solution: you need to search them all, and they all offer new learning opportunities.
__________________
Michael Kay
http://www.saxonica.com/
Author, XSLT 2.0 and XPath 2.0 Programmer\'s Reference





Similar Threads
Thread Thread Starter Forum Replies Last Post
Button onclick function in Repeater rathbird General .NET 12 April 5th, 2007 03:17 AM
Image button onclick msbsam ASP.NET 2.0 Basics 0 December 30th, 2006 04:47 AM
Change onclick of a button me_zeta HTML Code Clinic 1 November 20th, 2006 10:34 AM
Button onClick Apocolypse2005 Javascript 1 November 25th, 2005 09:37 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.