|
Validating form values using AJAX methods is an uneccessary and wasteful step, the form is going to be sent to the server anyway, why would you query the server about every entry first??
Validate by javascript before (or on) submission or validate server side after submission.
There are of course some valid reasons for making some checks on certain items are allowed, checking if a particular username is available for instance.
For such an instance you would need a server side function that responded with a true or false, call that using the usual XMLHttp mehods then your javascript would take appropriate actions based on the returned value. EXACTLY the same as you would use for ANY other AJAX method.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
|