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

RE: Contents of a <div> into an AVT?

Subject: RE: Contents of a <div> into an AVT?
From: "Kathy Burke" <Kathy_Burke@xxxxxxxxx>
Date: Wed, 6 Aug 2003 15:52:57 -0400
kat martinez
Thank you. That was it exactly...when I was receiving an error message about
the variable missing, didn't get that it was out of scope...but I'm glad to
know it wasn't the use of the variable...because then I would be back to
square one...I had though I'd made a little progress.

:-)

Kat

-----Original Message-----
From: Martinez, Brian [mailto:brian.martinez@xxxxxxxxxxx]
Sent: Wednesday, August 06, 2003 2:42 PM
To: 'xsl-list@xxxxxxxxxxxxxxxxxxxxxx'
Subject: RE:  Contents of a <div> into an AVT?


> From: Kathy Burke [mailto:Kathy_Burke@xxxxxxxxx]
> Sent: Wednesday, August 06, 2003 12:19 PM
> To: 'xsl-list@xxxxxxxxxxxxxxxxxxxxxx'
> Subject: RE:  Contents of a <div> into an AVT?
> 
> 
> that just gives me 'this.id'. If I put a number in the 
> script, it works
> fine. I need it to be dynamic based on the <step> element's 
> xsl:number.
> Using the <xsl:variable> and <div> as I indicated, gives me 
> the correct html
> EXCEPT when referring to the {id} within the script. Perhaps 
> I took the
> wrong approach all together?
> 
> Hope I'm not being dense, again.

Since you're creating the value of the id attribute via XSLT, and it's in a
consistent format, couldn't you also create the argument passed into your
JavaScript function the same way?  Something like:

<xsl:variable name="id">
  <xsl:number level="multiple" count="step" format="1.1"/>
</xsl:variable>

<input type="button" value="Anomaly"
  onclick="Javascript:Anomaly('Step_{$id}','{.}')"></input>

<div id="Step_{$id}">
  <xsl:value-of select="$id"/>
</div>

(Note I moved your xsl:variable declaration above the input element--it may
just be a matter of rearranging your template.)

hth,
b.

| brian martinez                           brian.martinez@xxxxxxxxxxx |
| lead gui programmer                                    303.357.3548 |
| cheap tickets, part of trip network                fax 303.357.3380 |
| 6560 greenwood plaza blvd., suite 400           englewood, co 80111 |
| cendant travel distribution services   http://www.cheaptickets.com/ |

 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

PURCHASE STYLUS STUDIO ONLINE TODAY!

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.
Email
First Name
Last Name
Company
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.