xsl-list
[Top] [All Lists]

pass a JavaScript variable to a XSL variable

2003-11-08 05:34:56

I am trying to use JavaScript to query  XSL.
I would like to pass a JavaScript variable to a XSL variable.
So far I have not found a solution.
The page displays but does not execute the JavaScript.
I have tried the following.
Is there a way to do this?
-----------------------------------

<xsl:variable name="lastnamez">
<script>
                        var strID = location.search.substring(1)
                //       strID = 'Bloggs'
                        document.write(strID);
                        alert("jello")

</SCRIPT>
</xsl:variable> 

------------------------
<xsl:variable name="lastnamez">Bloggs
<SCRIPT language="javascript">
<xsl:comment>
<![CDATA[
                        var strID = location.search.substring(1)
                //       strID = 'Bloggs'
                        document.write(strID);
                        alert("jello")
]]>
</xsl:comment>
</SCRIPT>
</xsl:variable> 
-------------------------------
<xsl:variable name="lastnamez"> 
<SCRIPT language="javascript">
<![CDATA[


                        var strID = location.search.substring(1)
                //      strID = 'Bloggs'
                        document.write(strID);
]]>
</SCRIPT>
</xsl:variable> 

-------------------------


lhudspeth(_at_)mindspring(_dot_)com

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



<Prev in Thread] Current Thread [Next in Thread>
  • pass a JavaScript variable to a XSL variable, lhudspeth <=