Passing a value from a pure HTML script?

Discussion in 'HTML' started by araminska, Jan 12, 2008.

  1. araminska

    araminska Guest

    I always work from the perl end of a web page and very seldom see the
    HTML code that the server puts out, so I am not an HTML heavy. But I have
    a project that would be very easy if I could pass a single value from a
    link in a static HTML script without using form action. Otherwise I have
    to recode a huge static web page with links calling multiple subpages that
    are almost alike except for a paragraph or two. (At this point I could
    give a lecture about the mess that can occur when a "very bright" nephew
    was hired for a project by the boss).

    An example link is <a href="subpage.pl">Info</a> and obviously calls a
    perl script with no options. I would like to call that same script from a
    list of links but with some different value that the script would be able
    to use to bring up the proper info.

    Since all my looking in HTML books and googling always comes up with using
    form action or javascript to pass values, it maybe that static HTML can't
    do it.

    If so, I can code the program the usual way, but I thought it would be
    interesting to see if the above can be done.

    Thanks any
    Araminska
     
    araminska, Jan 12, 2008
    #1
    1. Advertising

  2. Gazing into my crystal ball I observed araminska <>
    writing in news::

    > An example link is <a href="subpage.pl">Info</a> and obviously calls a
    > perl script with no options. I would like to call that same script
    > from a list of links but with some different value that the script
    > would be able to use to bring up the proper info.


    <a href="subpage.pl?q=value">Info</a> then have your script look at the
    querystring.

    --
    Adrienne Boswell at Home
    Arbpen Web Site Design Services
    http://www.cavalcade-of-coding.info
    Please respond to the group so others can share
     
    Adrienne Boswell, Jan 12, 2008
    #2
    1. Advertising

  3. araminska

    araminska Guest

    On Sat, 12 Jan 2008 19:44:47 +0000, Adrienne Boswell wrote:

    > Gazing into my crystal ball I observed araminska <>
    > writing in news::
    >
    >> An example link is <a href="subpage.pl">Info</a> and obviously calls a
    >> perl script with no options. I would like to call that same script
    >> from a list of links but with some different value that the script
    >> would be able to use to bring up the proper info.

    >
    > <a href="subpage.pl?q=value">Info</a> then have your script look at the
    > querystring.
    >


    Thanks much. Worked great. Althought, interestingly enough, now that I
    know how to do it, I STILL can't find the answer in either of my HTML
    books. That method appears to be so common that everybody knows about it
    and mentioning it in a manual is not needed, or it is never used and nobody
    cares.

    Maybe I should get in on a project where I can work for a while on HTML
    from the top down, rather than the bottom up:)

    Thanks again
    Araminska
     
    araminska, Jan 13, 2008
    #3
  4. araminska wrote:
    > On Sat, 12 Jan 2008 19:44:47 +0000, Adrienne Boswell wrote:
    >
    >> Gazing into my crystal ball I observed araminska <>
    >> writing in news::
    >>
    >>> An example link is <a href="subpage.pl">Info</a> and obviously calls a
    >>> perl script with no options. I would like to call that same script
    >>> from a list of links but with some different value that the script
    >>> would be able to use to bring up the proper info.

    >> <a href="subpage.pl?q=value">Info</a> then have your script look at the
    >> querystring.
    >>

    >
    > Thanks much. Worked great. Althought, interestingly enough, now that I
    > know how to do it, I STILL can't find the answer in either of my HTML
    > books. That method appears to be so common that everybody knows about it
    > and mentioning it in a manual is not needed, or it is never used and nobody
    > cares.


    Well is not strictly HTML, more a matter of scripting. You will find in
    books about JavaScript and server-side PHP, Perl...

    Google "query string" for more info.

    <a href="subpage.pl?q=value">Info</a>

    works like a form via GET method

    <form action=subpage.pl" method="get">
    <div>
    <input type="hidden" name="q" value="value">
    <input type="submit" value="Info">
    </div>
    </form>



    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
     
    Jonathan N. Little, Jan 13, 2008
    #4
  5. araminska wrote:
    > On Sat, 12 Jan 2008 19:44:47 +0000, Adrienne Boswell wrote:
    >
    >> Gazing into my crystal ball I observed araminska <>
    >> writing in news::
    >>
    >>> An example link is <a href="subpage.pl">Info</a> and obviously calls a
    >>> perl script with no options. I would like to call that same script
    >>> from a list of links but with some different value that the script
    >>> would be able to use to bring up the proper info.

    >> <a href="subpage.pl?q=value">Info</a> then have your script look at the
    >> querystring.
    >>

    >
    > Thanks much. Worked great. Althought, interestingly enough, now that I
    > know how to do it, I STILL can't find the answer in either of my HTML
    > books.


    It isn't an HTML feature, it's a feature of the server-side process
    (Perl or whatever).
     
    Harlan Messinger, Jan 13, 2008
    #5
  6. araminska wrote:

    > Thanks much. Worked great. Althought, interestingly enough, now that I
    > know how to do it, I STILL can't find the answer in either of my HTML
    > books. That method appears to be so common that everybody knows about it
    > and mentioning it in a manual is not needed, or it is never used and
    > nobody cares.


    As far as HTML is concerned, a URL is a URL. It doesn't matter if it has a
    query string or not.

    --
    David Dorward
    http://dorward.me.uk/
    http://blog.dorward.me.uk/
     
    David Dorward, Jan 13, 2008
    #6
  7. araminska

    Neredbojias Guest

    Well bust mah britches and call me cheeky, on Sun, 13 Jan 2008 10:44:41
    GMT David Dorward scribed:

    > araminska wrote:
    >
    >> Thanks much. Worked great. Althought, interestingly enough, now
    >> that I know how to do it, I STILL can't find the answer in either of
    >> my HTML books. That method appears to be so common that everybody
    >> knows about it and mentioning it in a manual is not needed, or it is
    >> never used and nobody cares.

    >
    > As far as HTML is concerned, a URL is a URL. It doesn't matter if it
    > has a query string or not.


    And you are "The Duke of Url"...

    --
    Neredbojias
    Riches are their own reward.
     
    Neredbojias, Jan 13, 2008
    #7
    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. Gernot Frisch
    Replies:
    6
    Views:
    346
    Moonlit
    Sep 9, 2004
  2. Todd Aspeotis
    Replies:
    3
    Views:
    500
    Kanenas
    May 30, 2005
  3. Replies:
    4
    Views:
    822
    Ben C
    Mar 29, 2008
  4. Replies:
    4
    Views:
    470
  5. Robert Cohen
    Replies:
    3
    Views:
    305
    Andrew Durstewitz
    Jul 15, 2003
Loading...

Share This Page