colind
asked on
Executing Local Script
Very simple question here... When the user presses on the submit button on my form, I would like to pass the form information to a perl script which is located in the same directory as the .HTML page on the user's computer. I have no way of knowing what that directory is... All I know is that the .HTML and the .PL files are in the same directory.
Here's the "ACTION" statement that I've tried, among other things... Why doesn't it work?
ACTION=".\getform.pl"
I only give the ACTION because I'm pretty sure everything else is OK. I'm almost positive that the problem has to be in that statement.
Thanks in advance,
COlin
Here's the "ACTION" statement that I've tried, among other things... Why doesn't it work?
ACTION=".\getform.pl"
I only give the ACTION because I'm pretty sure everything else is OK. I'm almost positive that the problem has to be in that statement.
Thanks in advance,
COlin
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Oh, I forgot to add that I don't know the name of the directory that this script and .HTML file are going to be store in, so I don't think "../../cgi-bin/getform.pl" would work. Isn't that relative idea the same as putting "./getform.pl" with "." being the current directory.
Colin
Colin
Ah, I see.
To run scripts you have to have a server. I do something similar on my PC because I test my web site before I upload it. To run scripts (on a PC) you need PWS (Personal/Peer Web Server) from Microsoft. You presumably already have the perl interpreter.
It is possible (I think) to run scripts from the same directory as the documents if it is installed correctly.
If you don't like the idea of installing PWS (since you persumably want to run this program on your customers PC's) then I am afraid that there is no alternative. Although standard HTML can be run from 'open file' menu of your browser there is no way to run scripts from the local file system. If you try to run a script you will just get the contents of the script sent to the screen.
To run scripts you have to have a server. I do something similar on my PC because I test my web site before I upload it. To run scripts (on a PC) you need PWS (Personal/Peer Web Server) from Microsoft. You presumably already have the perl interpreter.
It is possible (I think) to run scripts from the same directory as the documents if it is installed correctly.
If you don't like the idea of installing PWS (since you persumably want to run this program on your customers PC's) then I am afraid that there is no alternative. Although standard HTML can be run from 'open file' menu of your browser there is no way to run scripts from the local file system. If you try to run a script you will just get the contents of the script sent to the screen.
ASKER
Well, that really sucks. Yes, my plan was to "compile" my script using Perl2exe.exe (to make a stand-alone executable) then to use a .HTML file for my interface. I'll give you the points but can you suggest another alternative to having the command line interface? Are there any PERL modules that can offer me a Windows interface with message boxes and all that fun stuff?
Thanks again,
Colin
Thanks again,
Colin
You problem is one I have given much though to myself since I had a similar application some months ago. In all that time I have not seen or come up with an easy solution.
I have however seen a company that distributed data on CD-ROM. The provided their own browser and ISTR that they could run scripts or executables. Writing your own browser however is a big and pointless job.
I have however seen a company that distributed data on CD-ROM. The provided their own browser and ISTR that they could run scripts or executables. Writing your own browser however is a big and pointless job.
ASKER
At the same time that I posted that last comment, I posted a question in the PERL area and got an answer from nanulnet. Check out the following URL... It looks like it will give us access to the Win32 API.
http://194.247.167.1/DADA/PERL/API/index.sht
http://194.247.167.1/DADA/PERL/API/index.sht
Thanks for feedback on that approach. My problem was that I *must* use HTML and a web browser (since that is platform independent etc). Your problem is not that you must use HTML but that you must run your perl script. The answer by nanulnet would seem to solve your problem of what interface to use. I hope it solves your problem.
ASKER
I'll try creating a directory called cgi-bin and storing my scripts there but it seems to me that there should be a way to have an .HTML file which calls a script in the same directory.
Can you suggest anything else?
Colin