...

View Full Version : JavaScript + XSL



sushestvo
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>
</xsl:if>
</xsl:template>

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? :/

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

rm-f
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)]

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



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum