[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
RE: [xsl] Javascript variable to XSL variable
Subject: RE: [xsl] Javascript variable to XSL variable From: "Jaime Stuardo" <jstuardo@xxxxxxxxxxx> Date: Thu, 17 Feb 2005 08:44:33 -0400 |
I think you cannot do that due to the way XSL and JavaScript work. JavaScript is executed by the browser, which only interprets HTML code.. If you display an XML in the browser using a XSL, the browser finally will receive the HTML, and in that moment all JavaScript code may be executed. Why do you have to do that? cannot you use only JavaScript? Maybe if you tell what you plan to do, maybe we can suggest the way to go around that. Jaime -----Mensaje original----- De: Camalesn [mailto:noelamac@xxxxxxxxx] Enviado el: Jueves, 17 de Febrero de 2005 4:19 Para: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Asunto: Re: [xsl] Javascript variable to XSL variable On Wed, 16 Feb 2005 15:22:55 -0400, Jaime Stuardo wrote: > I think onChange="{$your_variable}" would work Hi Jaime, It is a Javascript variable, not XSL variable. The variable contains the value of combo box, so I need to pass this one to use it as XSL param or variable to filter some results. <script type="text/javascript"> function getValue() { var=document.form1.combo1.value return var; } </script> <select name="combo1"> <option select="{$value1}>Option1</option> <option select="{$value2}>Option2</option> <option select="{$value3}>Option3</option> <option select="{$value4}>Option4</option> </select> "var" is a Javascript variable and I need to get something like: <xsl:param name="var2" select="(value of var)"/> <xsl:value-of select="$var2"/> Greetings,
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Javascript variable to XS, Camaleón | Thread | Re: [xsl] Javascript variable to XS, Camaleón |
[xsl] Re: xsl-list Digest 17 Feb 20, Carl Jenkins | Date | RE: [xsl] Validate Doc XML with XML, Jarno.Elovirta |
Month |