Forum Moderators: open
I would like to re-clarify:
I have created the form and a submit button.
I am comfortable with the html document, but I have
no experience with scripts or how they should be set up and linked to my document or form.
Here’s what my host said about putting a form on their server.
“i assume you mean an html form, and that would be used in conjuntion
with something such as cgi or php. we do not provide that service.
Tim (7:54 PM) :
however you can certainly put these on your website, you just have
to write them yourself or have someone do it for you.
I have been looking for a script, but I read about positives and negatives.
So, I’m not clear about what script would be best for this form. Can anyone help?
In looking at the document, I’m guessing about what to do. (using Dreamweaver as editor)
1. I should create a folder and name it “cgi-bin”
2. In that folder, have a txt document named? (don,t know what to name it)
3. Put the script on that txt document.
4. Those should be uploaded into my root folder
Now linking…
5. After I highlight the form on the document, the property inspector is visible.
6. What goes in the “form name field”
7. What goes in the “action field”
8. Should the Method remain “post”
Please advise what’s right and wrong with the above.
If I can understand this part, I may be able to complete
this task.
Thank you very much,
Brad
For the most part, you're in the wrong place if you are thinking of PHP, Perl, probably ASP too. This is Javascript. It's all script, I know, but...
Good luck.
Bernard has you headed in the right direction. Here are a couple of concepts that might help, too:
The CGI directory is normal on your hard drive (you store text files and binary files in there) but it is special on your web server. You need to be able to make (1) that directory a "script" or "executable" directory, and (2) you need to be able to specify "permissions" on the files inside it.
The script you end up using will probably be a PERL script, so your text file can have either the .pl or the .cgi extension ... but it must have an extension recognized by your web server's configuration. Ask your host what extensions you can use and how to set up your cgi-bin (or cgi_bin) folder for executing scripts.
In your Dreamweaver scenario, you can name the form pretty much anything, but stay away from weird characters and spaces. You might need to remember the form name so you can use it in your script.
The "action" refers to "where do you want the form's output to go?". In your case, the "action" will be the location and name of the script you put in your CGI directory. (i.e. /cgi_bin/formparse.cgi) Inquire with your host about what path to use for your CGI directory, after you have it all set up.
Indeed, read up on CGI directories and form processing. You will find very little about Javascript in those documents. :)