example: |
jt_FormValid.reset(); jt_.FormValid.reqField(document.FEEDBACK.FirstName, "First Name"); jt_.FormValid.reqField(document.FEEDBACK.LastName, "Last Name"); jt_.FormValid.reqEmail(document.FEEDBACK.Email); jt_.FormValid.reqSelect(document.FEEDBACK.Regarding, "Regarding"); if (jt_FormValid.msg == "") { // do AJAX... } else {alert(jt_FormValid.msg);} |
description: |
Methods for form validation.
73 lines of code, 2.37 KB |
main methods: |
reset: function() reqField: function(formField, fldLabel) reqSelect: function(formField, fldLabel) reqEmail: function(formField) validEmail: function(emailStr) setFldGood: function(formField) setError: function(formField, addMsg) |