[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: How to pass on xml information to javascript in XS

Subject: Re: How to pass on xml information to javascript in XSL
From: Joerg Heinicke <joerg.heinicke@xxxxxx>
Date: Fri, 18 Oct 2002 02:30:37 +0200
pass information to javascript
Attribute Value Templates {}:

<input type="button" value="Add To Cart" onClick="addcart('{name}',7,10)"/>

or xsl:attribute:

<input type="button" value="Add To Cart">
  <xsl:attribute name="onClick">
    <xsl:value-of select="name"/>

I prefer the first version.



aSad Khan wrote:

I know this is how you extract XML information in XSLT:

Name: <xsl:value-of select="name"/><br/>

Now I have something like this:

<input type="button" value="Add To Cart" onClick="addcart('name',7,10)"/>

But this send the literal string name to the function. How do I send the value of name instead? I can't find the syntax anywhere. Please help. Thanks.

Unlimited Internet access -- and 2 months free! Try MSN. http://resourcecenter.msn.com/access/plans/2monthsfree.asp

XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list

XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list

Current Thread


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.