[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Pass a variable value from javascript to xsl
>>>>> "ohtar" == ohtar <enrech@xxxxxxxxx> writes: ohtar> I am trying to pass a variable value from javascript to ohtar> xsl. For example, I have a xsl:variable called instance: ohtar> <xsl:variable name="instance"/> ohtar> And I want to assign a javascript variable value to ohtar> 'instance' The javascript code is: ohtar> <script language="JavaScript"> function example(){ var art ohtar> art = ohtar> document.exampleForm.artistOnChange[document.noadsterForm.artistOnChange.selectedIndex].text ohtar> } </script> ohtar> I call the javascript function in my xsl code when someone ohtar> select something in a form: You are NOT calling the javascript function from your xslt code - you are using XSLT to GENERATE a call to a javascript function (presumably you are generating html). This is a very different thing indeed. ohtar> <select name="artistOnChange" onchange="example"> ohtar> I want to save the value of the javascript variable 'art' ohtar> into the xsl:variable 'instance'. How can I do that? I'm ohtar> using xalan. You can't. XSLT finishes, and you are left with an html page, which you are then displaying (presumably) in your web browser. -- Colin Paul Adams Preston Lancashire
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|