Apache question

J

joe

I am learning Javascript by running Apache on my computer. The following question
does not have Javascript because I've stripped it from a larger project.

I have the following simple index.html:

<html>
<p>Test</p>
<p>
<form action="http://127.0.0.1/test.pl" method="POST">
<input type="text" name="textfield" value="Hi!">
<input type="submit" name="Submit" value="Submit">
</form>
</html>

and the test.pl Perl file is even simpler:

#!/usr/bin/perl
open COLOURS, ">colours.txt";
print COLOURS "My favourite colour is blue\n";
close COLOURS;

When I open the IE and go to http://127.0.0.1 I get the test form above. But
when I press the Submit button I get Save/Open dialog instead of colours.txt
being created.

I have set up a Perl interpreter. When I run "perl test.pl" from DOS command
prompt I get what I expect.

What gives?
 
J

Janwillem Borleffs

joe schreef:
I have set up a Perl interpreter. When I run "perl test.pl" from DOS command
prompt I get what I expect.

You will also have to add a Perl script handler to the httpd.conf for
the script to be correclty interpreted.

You should consult the web or one of the many Apache-related newsgroups
for further guidance, as this problem has nothing to do with JavaScript.


JW
 
R

Robert

joe said:
I am learning Javascript by running Apache on my computer. The following question
does not have Javascript because I've stripped it from a larger project.

Okay... so you are learning javascript from an example that contains no
javascript? And then you ask in a javascript group why your example
devoid of any javascript does not do what you want? Does that not sound
silly to you?

I have no knowledge of Perl or of the Apache webserver, but if I would
have to take a guess it is that an incorrect mime-type is returned for
the text file in your http header.

This answer did not contain any javascript either...

Robert.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top