![]() Topic awaiting preservation: Form Validation madness (Page 1 of 1) |
|
---|---|
Bipolar (III) Inmate From: |
![]() Alright I've this form with lots of checkboxes: code: <input type='checkbox' name='adam'>
code: <span>Name:</span><input type='text' name='name'>
code: function validator(theForm){
code: var myArray = new Array ('adam', 'bill', 'chad',...and so on);
|
Maniac (V) Mad Scientist From: 100101010011 <-- right about here |
![]() Usually what you need to do (and you may be doing this and not posting the code) but when you do a validator with a form field you need to return false to the onSubmit event handler. |
Bipolar (III) Inmate From: Amsterdam |
![]() Wouldn't it just be easier to go through the validations, and if everything appears to be ok call formName.submit() ? |
Lunatic (VI) Mad Scientist From: Massachusetts, USA |
![]() Maybe so, but returning false to cancel the submission is more elegant. Also, it will work in browsers with Javascript turned off. |
Bipolar (III) Inmate From: |
![]() Ahhhh! Yes. |