Mailto Form JavaScript Tutorial
An easy to install comments form for use on sites that do not have CGI-bin access.
This script verifies an entry into the name and email field. It can be customized to verify any or all entries.
The complete script is shown below; copy and paste the code into your page as instructed.
Step 1: Paste Into the Head
Paste this, unchanged, into the head of your document. This is the same as the head.txt document in the zip file.
Verify Fields
You do not need to change anything in the above code. As mentioned above, it is set to verify the name and email fields; you will need to customize this part to verify more fields.
Copy and paste this line of code into the script. This is a copy of the name validation; change the NAME and Name to the field you want to verify. Paste these lines of code in order as they appear in the form.
Build Your Form
This is a working example. We have included a little bit of everything to help you create your own form fields.
Here is the form; you can copy and paste it into your page then customize it to fit your needs. We have added a little bit of everything to help you create the form fields you need. The only difference between this form and the one in the zip file is the addition of the radio buttons.
Paste the form into your page where you want the form to be.
What Else You Must Change
You must change the email address. It is the third line of the form. It is currently configured to send email to me. Be sure to change it or your visitors will be sending email to me.
Problems configuring the script or your form? Just fill out the form above to let us know. Please be as specific as possible about the problem you are having.