View Full Version : JavaScript + XSL

09-28-2005, 05:04 PM
if i have a function like
function blabla(ID){
document.Form.SelectBoxName.value = "]]><xsl:apply-templates select="ITEM"/><![CDATA[";

and then i have:
<xsl:template match="ITEM">
<xsl:if test="ID ='IDFROM JavaScript'">
<option value="{Email}"><xsl:value-of select="LastName" /></option>

how can I do that? I know document.Form.SelectBoxName.value is incorrect, i'm just not sure how to do this. Pretty much onclick where blabla(ID) will be called, depending on ID it would insert into Select Box values from XML in ITEM/ where within each ITEM, ID would equal to blabla(IDHERE)
is this understandable? :/

09-28-2005, 05:37 PM
is this understandable? :/
no it is not.

09-28-2005, 06:43 PM
I dot think it is going to work (I would like to see oposite) in a Web Browser environment. If you use Rhino and Xalan it could be possible (?? maybe).

Web Browser:
XML -> [builtin XSL Transformmer (XSL templates)] -> HTML doc <-> [builtin JS engine (JS code)]

09-28-2005, 07:14 PM
I decided to do it straight in .asp
w/o using XSLT page...