[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

pass a parameter from the URL using Javascript

Subject: pass a parameter from the URL using Javascript
From: "Leonidas Kanellos" <leonidaskanellos@xxxxxxxxxxx>
Date: Wed, 02 Apr 2003 12:42:45 +0000
javascript pass url
Hi,

Does anyone know how to pass a parameter from the URL?

I declare my parameter at the top of the xsl stylesheet, like that:
<xsl:param name="page_number" select=" 1 "/>
iI change the select value and i get the h2 that i want.

My xml file looks like that:

	<div class="section">
			<h2>Chris</h2>
			<p>text</p>
			<p>text</p>
		</div>
		<div class="section">
			<h2>
				<a href="http://www.mypage.com">Leo</a>
			</h2>
		</div>
		<div class="section">
			<h2>George</h2>
			<p>text</p>
		</div>
		<div class="section">
			<h2>Alex</h2>
			<p>text</p>
			<p>text</p>
		</div>


In my xsl i have this template witch i pick-up the desired h2 each time:


<xsl:template match="//xhtml:div[@class='section'][position()=$page_number]/xhtml:h2/*">

<xsl:when test="//xhtml:div[@class='section'][position()=$page_number]">
</xsl:template>

I found something like:

<script>

var page_number = location.search.substr(1).split("?");

</script>


but no luck...


Cheers

Leo

_________________________________________________________________
The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail



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



Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.