-1

Hi..everyone,
i have been designed a form then validate using php with ajax. I comple ted that php coding.But i know little bit about ajax.how to validate multiple fields in a form

Votes + Comments
Please don't hijack threads, create your own.
2
Contributors
3
Replies
4
Views
6 Years
Discussion Span
Last Post by Taywin
0

You mean you need to validate value "before" you send it out to the server? Then it is more likely JavaScript only. The Ajax part is only a part to send requests and receive back from the server for display. However, you still "have to" validate the data again on your server side because JavaScript can be tampered easily. JavaScript is there just for convenient for naive users.

0

Thank you for your valuable reply. ya its correct.for example the form has two fields. I used onBlur event for function call. Entering the cursor on the first field the second field also validated.its why plz help me..

0

You need onsubmit="return functionname(arguments, ...)" at the "form" tag. Not on each element. Using onblur is actually not a good idea on most cases because only 1 element can be focused at a time. Therefore, onblur may call all other elements once you move from one to the other element.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.