Home
TeamSite
How to Assign a JavaScript variable value to XSLT
optus_76
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>
Thank you in advance for any help.
Find more posts tagged with
Comments
wscott
I'm not sure I understand what you are asking, but within LiveSite components, XSLT runs on the server and JavaScript runs on the client, so it may be difficult to mix-and-match them in this way.