How to pass a parameter using HTML link?

Discussion in 'XML' started by bearclaws, Feb 1, 2005.

  1. bearclaws

    bearclaws Guest

    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!
     
    bearclaws, Feb 1, 2005
    #1
    1. Advertising

  2. bearclaws

    anonymous Guest

    bearclaws wrote:
    > 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?
     
    anonymous, Feb 1, 2005
    #2
    1. Advertising

  3. bearclaws

    bearclaws Guest

    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.
     
    bearclaws, Feb 2, 2005
    #3
  4. bearclaws

    anonymous Guest

    bearclaws wrote:
    > 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.
     
    anonymous, Feb 2, 2005
    #4
  5. bearclaws

    bearclaws Guest

    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?
     
    bearclaws, Feb 4, 2005
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Neal
    Replies:
    2
    Views:
    598
    Jim Gibson
    Oct 20, 2003
  2. Julien C.
    Replies:
    5
    Views:
    5,583
    Patrice Scribe
    Dec 23, 2003
  3. Kevin Spencer

    Re: Link Link Link DANGER WILL ROBINSON!!!

    Kevin Spencer, May 17, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    941
    Kevin Spencer
    May 17, 2005
  4. olga
    Replies:
    7
    Views:
    238
    Michael Winter
    Oct 27, 2004
  5. AzamSharp
    Replies:
    2
    Views:
    199
Loading...

Share This Page