Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Apache question

Reply
Thread Tools

Apache question

 
 
joe
Guest
Posts: n/a
 
      06-09-2006
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?
 
Reply With Quote
 
 
 
 
Janwillem Borleffs
Guest
Posts: n/a
 
      06-09-2006
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
 
Reply With Quote
 
 
 
 
Robert
Guest
Posts: n/a
 
      06-09-2006
joe wrote:
> 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.
 
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
Apache Tomcat5.5 clustering problem with Apache HTTP server 2.2.4 tanmoy.b81 Java 0 02-04-2009 08:46 AM
Problems running Apache FOP: org.apache.fop.fo.FOTreeBuilder fatalError Pablo Java 0 03-28-2007 02:31 PM
org/apache/xpath/objects/XObject incompatible with org/apache/xpath/objects/XNodeSet duduch_1er@hotmail.com XML 4 08-10-2006 01:38 PM
Apache FileUpload - java.lang.NoClassDefFoundError: org/apache/commons/io/FileCleaner kebabkongen@hotmail.com Java 2 03-16-2006 09:20 AM
AXIS jars org.apache.axis.wsi.* and org.apache.axis.transport.jms.* unkwb@web.de Java 0 02-23-2005 04:02 PM



Advertisments