I am trying to assign a random number generated by javascript function to a xsl variable which will be used to construct a query string for redirect purpose. Example of code:
<xsl:variable name ="tstVar1" select ="1" />
<xsl:variable name="tstVar" select="null" />
<script type="text/javascript">
var a ='<xsl:value-of select="$tstVar1"/>';
var b = Math.floor(Math.random() * (100 - 50 + a)) + a;
</script>
I need to assign the value of b to tstVar. How can i do this ?
Thanks.