Subject:Assign a JavaScript variable value to XSLT Author:Jay Upadhyay Date:23 Jan 2007 05:26 PM Originally Posted: 22 Jan 2007 07:59 PM
Can someone help me with, how can I assign JavaScript variable value to XSLT?
I am trying to do paging using XML and XSLT. I am passing a parameter to a page link and on page submit I receive the start page number and end page number in URL. I menipulate the url string and get the start page and end page number in javascript variable. That I need to put in a condition to display the list of items.
e.g.
<script type="text/javascript">
<![CDATA[
var sPage = 11; // Start page number
var ePage = 20; // End page number
]]>
</script>
<xsl:if test="position <= '(here I have to use javascript variable value) and position >= '(here I have to use javascript variable value)">
rest of the code to print the list.
...
...
...
</xsl:if>