The I've never seen a book not explain what you have just discovered.
Only the books will talk about the difference between POST and GET. 
But if you try to transfer a lot of info to the script you will find out
about url length problems.

Here is another way
http://www.yourdomain.com/cgi-bin/some.cgi/home/www/private/my_info.txt
the string "/home/www/private/my_info.txt" will be available as the
environment variable PATH_INFO


On Sat, 19 Oct 2002 13:44:30 -0400
Joel Hammer <[EMAIL PROTECTED]> wrote:

>Thanks.  That works.  It is a simple solution, too.
>
>I have been confused because I have been looking at forms to send data
>to a CGI script. The forms don't send data about the status of input
>buttons, so I have been hitting my head against the old stone wall.
>Maybe it is best just to abandon forms and just use links, as you have
>suggested. Certainly, this will do what I need.
>
>I guess what I would like to have ideally is a way to use javascript to
>send data to a CGI script. Incorporating your suggestion, I think the
>code below actually does what I need:
>
><script>
>function CallCGI(data){
>window.location="script.cgi?" + data
>} 
></script>
>
>In the body of the html, 
><input type="button" onclick="CallCGI('TheData')">
>
>I guess this must be so obvious that neither of my two books devoted
>to javascript, or my book devoted to cgi, or my book devoted to html,
>bothers to mention this. All the discussions I could find emphasize
>that forms and environmental variables (which I don't see how to change
>from the html) are the way to talk to CGI. It makes me wonder if this
>is the right way to go. But, if it works, who cares if it is the
>"right" way. It is amazing how many "options" you have when you start
>working with html, javascript, cgi, etc. to do anything out of the
>ordinary, at least for this amateur.
>
>Of course, necessity being what it is, I was motivated enuf to learn
>about SSI. Although that is very interesting, and I am sure I'll find
>find uses for it, I don't know if it would solve the problem of
>interacting with CGI scripts.  But, at least I didn't waste all of my
>time trying to solve this!
_______________________________________________
Linux-users mailing list
[EMAIL PROTECTED]
Unsubscribe/Suspend/Etc -> http://www.linux-sxs.org/mailman/listinfo/linux-users

Reply via email to