How to pass a parameter using HTML link?

B

bearclaws

I'm new to XSL and am trying to pass a variable from a link on an HTML
page to a page containing XSL that needs to receive the parameter.

So, I'm thinking I need something like this:

1. A link with a parameter:
http://www.host.com/receivingpage.htm?category=computers

2. A way for the XSL on the "receivingpage.htm" to be able to grab the
"computers" value from the link and use it in the rest of the XSL
processing.

Any thoughts on how to do this?

I'm sure it's simple but a search on this site (and google) didn't turn
up any clear examples.

Thanks!
 
A

anonymous

bearclaws said:
I'm new to XSL and am trying to pass a variable from a link on an HTML
page to a page containing XSL that needs to receive the parameter.

So, I'm thinking I need something like this:

1. A link with a parameter:
http://www.host.com/receivingpage.htm?category=computers

2. A way for the XSL on the "receivingpage.htm" to be able to grab the
"computers" value from the link and use it in the rest of the XSL
processing.

Any thoughts on how to do this?

I'm sure it's simple but a search on this site (and google) didn't turn
up any clear examples.

Thanks!
But is not 'receivingpage.htm' a html page? Where does xsl come into play?
 
B

bearclaws

Sorry - receivingpage.htm is an html page but it contains the calls to
the XML and XSL page.

I found this solution which works very well; however, it seems pretty
complicated for what I'm trying to do:
http://www.experts-exchange.com/Web/Web_Languages/XML/Q_20310939.html

Any thoughts on a simpler solution?

I'm in the process of deconstructing the above soultion. I'll post my
results if I can scale the code down properly.
 
A

anonymous

bearclaws said:
Sorry - receivingpage.htm is an html page but it contains the calls to
the XML and XSL page.

I found this solution which works very well; however, it seems pretty
complicated for what I'm trying to do:
http://www.experts-exchange.com/Web/Web_Languages/XML/Q_20310939.html

Any thoughts on a simpler solution?

I'm in the process of deconstructing the above soultion. I'll post my
results if I can scale the code down properly.
Well, I do this all the time in some of my applications:

Using java, getting the parameter passed is a no brainer. Building an in
memory xml document or modifying one using the parameter is also trivial.
I know that one can pass variables to an xsl file, but I have never
attempted to do so.
 
B

bearclaws

I can do this easily with ASP but cannot use it for this particular
project...so I'm stumped.

I have to think that there is a Javascript or simple solution for this.

Anybody?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,999
Messages
2,570,243
Members
46,838
Latest member
KandiceChi

Latest Threads

Top