[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
RE: [xsl] Contents of a
RE: [xsl] Contents of a into an AVT?
Subject: RE: [xsl] Contents of a <div> into an AVT?
From: "Martinez, Brian" <brian.martinez@xxxxxxxxxxx>
Date: Wed, 6 Aug 2003 12:41:47 -0600
> From: Kathy Burke [mailto:Kathy_Burke@xxxxxxxxx]
> Sent: Wednesday, August 06, 2003 12:19 PM
> To: 'xsl-list@xxxxxxxxxxxxxxxxxxxxxx'
> Subject: RE: [xsl] 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
Current Thread
- RE: [xsl] Contents of a <div> into an AVT?, (continued)
- Kathy Burke - Wed, 6 Aug 2003 14:13:57 -0400
- Américo Albuquerque - Thu, 7 Aug 2003 01:13:01 +0100
- Kathy Burke - Wed, 6 Aug 2003 14:19:11 -0400
- David Carlisle - Thu, 7 Aug 2003 22:09:30 +0100
- Martinez, Brian - Wed, 6 Aug 2003 12:41:47 -0600 <=
- cknell - Wed, 06 Aug 2003 14:43:27 -0400
- Kathy Burke - Wed, 6 Aug 2003 15:52:57 -0400
<- Previous Index Next ->
RE: [xsl] Contents of a <div> into , David Carlisle
Thread
RE: RE: [xsl] Contents of a <div> i, cknell
RE: [xsl] Contents of a <div> into , Kathy Burke
Date
RE: RE: [xsl] Contents of a <div> i, cknell
Month
Keywords
Subject: RE: [xsl] Contents of a <div> into an AVT? From: "Martinez, Brian" <brian.martinez@xxxxxxxxxxx> Date: Wed, 6 Aug 2003 12:41:47 -0600 |
> From: Kathy Burke [mailto:Kathy_Burke@xxxxxxxxx] > Sent: Wednesday, August 06, 2003 12:19 PM > To: 'xsl-list@xxxxxxxxxxxxxxxxxxxxxx' > Subject: RE: [xsl] 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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Contents of a <div> into , David Carlisle | Thread | RE: RE: [xsl] Contents of a <div> i, cknell |
RE: [xsl] Contents of a <div> into , Kathy Burke | Date | RE: RE: [xsl] Contents of a <div> i, cknell |
Month |
Keywords
Products
Features
Resources
Support
Oxygen XML on Facebook
Follow
Oxygen XML on Twitter
Oxygen XML Web Feed
Oxygen XML
Blog
Oxygen XML Youtube Channel
© 2002-2022 SyncRO Soft SRL. All rights reserved.
This website was created & generated with <oXygen/>®XML Editor