Connecting Tech Pros Worldwide Forums | Help | Site Map

I need to pass some value from XSL to javascript.

Newbie
 
Join Date: Oct 2005
Posts: 2
#1: Oct 12 '05
I need to pass some value from XSL to javascript.
For the reasons it is inpossible to use xsl:param and xsl:variable.
There is some ‘if’ conditions in XSL that would modify that value.
I create id in my HTML.

Expand|Select|Wrap|Line Numbers
  1. <TABLE ALIGN ID="Table2">
  2.     <TR>
  3.         <td id="hasValue"/>
  4.     </TR>                        
  5. </TABLE>

Now I would like to save the data into that column.

Expand|Select|Wrap|Line Numbers
  1. <xsl:if test="$action = 'update'">
  2. <!—insert 0 into “hasValue”-->
  3. </xsl:if>
How can I do this?
And then I will be able to read that value in javascript.

Reply