Cut & Paste Manual Email check
|
Description: Often times in a form, the single most important field is the email address field. If a user inadvertently enters an incorrect address, the method of contact between you and the user is cut off. Here's a script that forces the user to double check whether a valid email is entered before submitting the form. It alerts a box with the entered address upon form submission, and asks the user whether this information is correct or not. Crude yet highly effective way to enforce a valid email entry!
Example:t
Directions:
Step 1: Cut and paste the below script into the <head> section of your page:
Having done the above, you now need to make two simple alterations to your form, so the email field is connected to the script, and manual checking is enabled.
Step 2: Inside the text box that holds the email address, give it a name using the "name" attribute (ie: useremail). For example:
<form>
"
<input type="text" value="Enter your email here!" name="useremail">
</form>
Step 3: Finally, add the below onSubmit event handler into the <form> tag itself:
<form onSubmit="return
alertemail(useremail)">
"
<input type="text" value="Enter your email here!" name="useremail">
</form>
Note that the name value specified in step 2 ("useremail") is used also as the parameter inside onSubmit.
You're done!