[xsl] Passing javascript value into xsl

Subject: [xsl] Passing javascript value into xsl
From: Mick <mick@xxxxxxxxxxxx>
Date: Mon, 5 Feb 2001 20:33:56 +0100
Hi all,

I have the following problem: I would like to pass a value obtained from a
pull down list (value obtained through xsl from an xml file) to a function
that will filter the same xml file for additional data. The xsl for the pull
down list is:

<form name="tales">
<select id="tales" onChange="displayList(this.form)">
<option value="">select a tale</option>
	<xsl:for-each select="mabinogion/tale/talename">
		<option value="{.}">
			<xsl:value-of select="."/>

The value of the pull down menu is stored as javascript "var x =
tales.tales.value". I want to use this value as a filter for another bit of

<xsl:for-each select="mabinogion/tale[talename=' ->x goes here<- ']">
	<xsl:for-each select="manuscript">
		<xsl:value-of select="manuscriptname"/>

and use the result of this xsl to populate <div id="list"></div> through:

<script language="JavaScript">
list.innerHTML = ->result of the previous xsl<-

All above bits work well seperately, but I can't get the whole thing to work
together (the quotes are probably the problem, but I've tried every possible
combination). Has anyone got any hints/clues/ideas/valium?


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Current Thread