I want to write a server side validation for a form. The idea is to check username and password, entered by a user in a database, and if one of them is wrong (or two) return an appropriate answer to a client page.
The answer will be appear in this line: <div name="user_answer"></div>
I intend to do a validation by jQuery.post() function. On the server side I wrote a script that checks username and password.
The question is how can I send the answer (for example "You typed a wrong password") from this script to a callback function of jQuery.post()?
Maybe somebody knows more simple way to do such validation?
Thanks in advance.
In reply to real time server side validation by yakoval
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |