spacer image Home | My Websites | Javascript Workbench


click here to see the source code
Formchex

Javascript can be used to inspect form data, to make sure the visitor followed the directions and the input is submitable.

I've written several of these form validation scripts for work lately, and have been evolving a standardized way to do it. I am recording it here mainly as a reference, so I can remember next time how to script each form element.



Please fill out this intelligent form!

A javascript will check to make sure that you followed the directions!

 
1 Type something here:
2 Type a number here
(digits 0-9 only): 
3 Type a word here
(letters a-z and A-Z only): 
4 Type something in E-mail address format (username@domain.extension):
5 Type something in this text area: 
6 Select one item from this list: 
7 Check at least one of these:  Yes  No  Maybe
8 Check only one of these: Yes  No  Maybe
9 Select one of these: Yes No Maybe
  Submit this form
when you have completed it
according to the directions.
         

*Note: This is just an example. The form is not actually submitted anywhere.
 


spacer image Home | My Websites | Javascript Workbench