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 |