HighDots Forums  

Passing a value from a pure HTML script?

alt.html alt.html


Discuss Passing a value from a pure HTML script? in the alt.html forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
araminska
 
Posts: n/a

Default Passing a value from a pure HTML script? - 01-12-2008 , 01:39 PM






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
  #2  
Old   
Adrienne Boswell
 
Posts: n/a

Default Re: Passing a value from a pure HTML script? - 01-12-2008 , 01:44 PM






Gazing into my crystal ball I observed araminska <none (AT) nowhere (DOT) com>
writing in news:13oi5qscp6rucfd (AT) corp (DOT) supernews.com:

Quote:
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
  #3  
Old   
araminska
 
Posts: n/a

Default Re: Passing a value from a pure HTML script? - 01-12-2008 , 09:03 PM



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

Quote:
Gazing into my crystal ball I observed araminska <none (AT) nowhere (DOT) com
writing in news:13oi5qscp6rucfd (AT) corp (DOT) supernews.com:

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
  #4  
Old   
Jonathan N. Little
 
Posts: n/a

Default Re: Passing a value from a pure HTML script? - 01-12-2008 , 09:43 PM



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

Gazing into my crystal ball I observed araminska <none (AT) nowhere (DOT) com
writing in news:13oi5qscp6rucfd (AT) corp (DOT) supernews.com:

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
  #5  
Old   
Harlan Messinger
 
Posts: n/a

Default Re: Passing a value from a pure HTML script? - 01-13-2008 , 02:03 AM



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

Gazing into my crystal ball I observed araminska <none (AT) nowhere (DOT) com
writing in news:13oi5qscp6rucfd (AT) corp (DOT) supernews.com:

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
  #6  
Old   
David Dorward
 
Posts: n/a

Default Re: Passing a value from a pure HTML script? - 01-13-2008 , 04:44 AM



araminska wrote:

Quote:
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
  #7  
Old   
Neredbojias
 
Posts: n/a

Default Re: Passing a value from a pure HTML script? - 01-13-2008 , 07:23 AM



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

Quote:
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
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.