benushroff
Programmer
Here is what I want to do.
I have a global variable defined in my xsl.
<script>
var colOrder = 0;
</script>
I have a template which takes a parameter ColToSort. That param needs to be passed back to a javascript function.
The javascript function presortTable changes the value of colOrder. However whenever I alert the value of colOrder, it always is 0.
I am expecting the value of global variable colOrder to change whenever we call template x.
Any help would be appreciated. Thanks in advance.
<xsl:call-template name="x">
<xsl:with-param name="ColToSort" select="'ColOrder'"/>
</xsl:call-template>
<xsl:template name="x">
<xsl
aram name="ColToSort" />
javascript:
resorttable(0,$ColToSort);
</xsl:call-template>
--JAVASCRIPT function----
function presortTable(col, colSort){
alert(colSort);
colSort = 5;
}
I have a global variable defined in my xsl.
<script>
var colOrder = 0;
</script>
I have a template which takes a parameter ColToSort. That param needs to be passed back to a javascript function.
The javascript function presortTable changes the value of colOrder. However whenever I alert the value of colOrder, it always is 0.
I am expecting the value of global variable colOrder to change whenever we call template x.
Any help would be appreciated. Thanks in advance.
<xsl:call-template name="x">
<xsl:with-param name="ColToSort" select="'ColOrder'"/>
</xsl:call-template>
<xsl:template name="x">
<xsl
javascript:
</xsl:call-template>
--JAVASCRIPT function----
function presortTable(col, colSort){
alert(colSort);
colSort = 5;
}