This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Pass xml values to a javascript function
- To: XSL-List at lists dot mulberrytech dot com
- Subject: [xsl] Pass xml values to a javascript function
- From: Chen Wang <wangchen01 at yahoo dot com>
- Date: Fri, 7 Sep 2001 22:37:52 -0700 (PDT)
- Reply-To: xsl-list at lists dot mulberrytech dot com
In xsl file, there is a javascript,
function toggle(id) {
codes here
}
which is used to change the display status of a
paragraph. A link will be used to invoke the
function, like this:
<a href="#"
onclick="toggle('a_paragraph_id')><xsl:value-of
select="paragraphname"></a>
And here is the paragraph should be changed:
<p style="display:none"><xsl:attribute
name="id"><xsl:value-of
select="paragraphid"/></xsl:attribute>paragraph
here</p>
As you may know, in xml there is an element like this:
<paragraphid>idnumer</paragraphid>. My question is:
how to pass idnumber to 'a_paragraph_id'.
The idea for this xsl is to generate a list of links
based on the paragraphs in a xml. And each link can
toggle the correspondent paragraph. Thanks,...chen
__________________________________________________
Do You Yahoo!?
Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger
http://im.yahoo.com
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list