[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|