Subject: RE: Show - hide with xslt? From: "Bjorn Boxstart" <bboxstart@xxxxxxxxxxxxx> Date: Fri, 25 Aug 2000 08:44:19 +0200 |
First put the value of generate-id() into a varible. then do something like the following: <a><xsl:attribute name="href">javascript:showhide('<xsl:value-of select="$myVar"/>')</xsl:attribute></a> also use the varible in: <div style="display:none"><xsl:attribute name="id"><xsl:value-of select="$myVar"/></xsl:attribute> ...[you content goes here]... </div> I hope this helps, but sorry I don't have time to test it myself. regards, bjorn -----Original Message----- From: owner-xsl-list@xxxxxxxxxxxxxxxx [mailto:owner-xsl-list@xxxxxxxxxxxxxxxx]On Behalf Of Andrea Penna Sent: Thursday, August 24, 2000 7:20 PM To: xsl-list@xxxxxxxxxxxxxxxx Subject: Re: Show - hide with xslt? This seems an easy way but... If I use this one: <xsl:variable name="my-id" select="generate-id()"/> <div style="display:none" id="$my-id"> <p><xsl:value-of select="$Abstract"/></p> </div> <a href="javascript:showhide('$my-id');"> It doesn't write or doen't generate the "id value". Besides, if I use this: <div style="display:none"> <xsl:attribute name="id"><xsl:value-of select="generate-id()"/></xsl:attribute> <p><xsl:value-of select="$Abstract"/></p> </div> It generates the attribute "id" but now how can I send it to the javascript function? <a href="javascript:showhide('How_Tell_it_I_Want_generated_ID_here???');"> Thank you for your suggestion. Bye, Andrea ----- Original Message ----- From: "Bjorn Boxstart" <bboxstart@xxxxxxxxxxxxx> To: <xsl-list@xxxxxxxxxxxxxxxx> Sent: Thursday, August 24, 2000 1:45 PM Subject: RE: Show - hide with xslt? > Your text ("click here to show") must somehow be connected to the > information that is being displayed or hidden. You can do this by using the > generateid() function in your xslt stylesheet, so that the following will be > the result: > > <a href="javascript:showhide('<generated id>');">[click here to show / > hide]</a> > <div id="<generated id>" style="display:none"> > <p>Blablalblbblbxkblkblk > blxkblkblkalkalbka > xkblalblblalbkalk > blkxlbkalkblakb</p> > </div> 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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: Show - hide with xslt?, Andrea Penna | Thread | Re: Show - hide with xslt?, Andrea Penna |
Re: How to embed xsl:value-of into , Russ Holmes | Date | RE: PDF, Bjorn Boxstart |
Month |