Posted by Michael Fesser on 11/04/07 08:25
..oO(Angela)
>That's extactly what I am wanting to do.
>
>Use Javascript/AJAX to display the error messages for user
>and use PHP (server side) to do the validation (regex, check db, etc).
JS is optional and not always available. Do you want such a critical
thing like error messages just be an "optional feature"?
>Purpose of looking at AJAX is because this is all done in 'real time'
>(asonychronous)
>
>Anyone with any simple examples?
Why not start simple with the most typical and most reliable way of
validating the form data on the server and displaying the form it again
with inline error messages if something was wrong?
_After_ that is working properly, you _could_ add some client-side stuff
to pre-validate fields before the form is submitted. This doesn't have
to be done with "AJAX" - plain JS is enough in many cases.
Micha
[Back to original message]
|