Help with HTML
May. 15th, 2004 10:13 pm![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
For our internal web page I'm trying to do a caption contest. I want the page to have a heading, the photo, the captions, and a place where you can add your own. When you click a button, the caption gets appended to the list of captions.
I tried cannibalizing a guestbook page and perl script, but the POST method somehow couldn't talk to the perl script.
Is there some way I could do it just using HTML and JavaScript?
I tried cannibalizing a guestbook page and perl script, but the POST method somehow couldn't talk to the perl script.
Is there some way I could do it just using HTML and JavaScript?
Gallery!
Date: 2004-05-16 04:43 am (UTC)no subject
Date: 2004-05-16 06:06 am (UTC)no subject
Date: 2004-05-17 07:49 am (UTC)no subject
Date: 2004-05-16 07:49 am (UTC)In the form, you need
action="[url-of-CGI-script]"
(usually it's a relative URL. You can omit it only if the form is generated by a GET of the same script that handles the POST).The script itself has to have execute permission for the user the server runs under, and that user has to have write permission for the file the comments are going into (and usually the directory, unless you want to start by creating an empty file). The server usually has to be told that it's ok to execute the script; this is usually done by putting it into a directory called
cgi-bin
. If the script is in the same directory as the data, the server has to be told to handle it as a CGI; most servers do not allow this because it can be a major security hole if done wrong.You can find a fairly simple example for the use of CGI for uploading here.
no subject
Date: 2004-05-17 07:51 am (UTC)All the files involved are protected to 777.
Any ideas?
no subject
Date: 2004-05-17 10:28 am (UTC).htaccess
. The executable had better be protected 755 and owned by you -- allowing the web server to write it would be bad.Other things being favorable, that might even be the problem: it's possible to set up the server so that it won't run CGIs unless it's reasonably safe.
If you can't run Perl out of your own directory, you'll have to use PHP.
no subject
Date: 2004-05-16 09:47 am (UTC)no subject
Date: 2004-05-17 07:51 am (UTC)no subject
Date: 2004-05-17 08:29 am (UTC)(Alas, I have no Javascript wisdom to impart for a workaround.)