Data Entry & Form Validation with JavaScript

Template with all common (form) input types
and JavaScript validation code

Topics

About this document
Using this document
Forms
Document object model
Java Script


FORM with all common field types
text
(len > 0)
text
(All uppercase alpha)
text
( all numeric)
text
( currency)
text
(Value 1-5)
text
(SSN with dashes)
text
(date MM/DD/YY)
textArea
radio 1     2    
checkBox
(only 1 selectable)
1     2    
select / option (menu)
password (6 digits)
hidden
file


The following control tags do not submit data......
submit
reset
image (submit icon)

Topics

About this document
Using this document
Forms
Document object model
Java Script

........... Html tags - full alpha list ...............

Only commonly used tags and attributes are listed.
Most attributes should be accessible by JavaScript.

 Tag               Attributes  (ALL CAPS = REQUIRED)

-ALL-                    id  class  style
a                            href  name  target
applet                   height  width
body                      background  bgcolor  text
button                   name  type  value
div                         align
font                        color  face  size
form                      ACTION  method name  target
h1-6                     align
head                  
hr                          align  size  width
img                       align  ALT  border  height  SRC  width
input                     (varies with type)
li                            value
meta                    CONTENT  name
p                           align
script                    language  src  TYPE
select                   multiple  name  size
span                
textarea               COLS  name  ROWS  

table                    align  bgcolor  border  cellpadding  cellspacing  width
tr                           align   bgcolor  valign
td                          align  bgcolor  colspan  height  rowspan  valign

Topic