Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Passing a value from a pure HTML script?

Reply
Thread Tools

Passing a value from a pure HTML script?

 
 
araminska
Guest
Posts: n/a
 
      01-12-2008
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
 
Reply With Quote
 
 
 
 
Adrienne Boswell
Guest
Posts: n/a
 
      01-12-2008
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

 
Reply With Quote
 
 
 
 
araminska
Guest
Posts: n/a
 
      01-13-2008
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
 
Reply With Quote
 
Jonathan N. Little
Guest
Posts: n/a
 
      01-13-2008
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
 
Reply With Quote
 
Harlan Messinger
Guest
Posts: n/a
 
      01-13-2008
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).
 
Reply With Quote
 
David Dorward
Guest
Posts: n/a
 
      01-13-2008
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/
 
Reply With Quote
 
Neredbojias
Guest
Posts: n/a
 
      01-13-2008
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.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Passing a class to a pure virtual function (without templates) captaincurk@googlemail.com C++ 4 04-22-2009 06:38 PM
Pure space directly inside div ignored, but pure space directlyinside span honored liketofindoutwhy@gmail.com HTML 4 03-29-2008 06:06 PM
Pure functions still pure after definition Todd Aspeotis C++ 3 05-30-2005 03:53 AM
Passing by const & and returning a temp vs passing by value and returningit Victor Bazarov C++ 25 03-23-2005 04:24 PM
passing class object to pure virtual fkt Gernot Frisch C++ 6 09-09-2004 10:16 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57