This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Pass xml values to a javascript function


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]