Ajax form validating

by  |  27-Nov-2019 18:54

Server-side validation is when form data is submitted, server analyzes then returns the user back to the form when items are invalid.

Client-side on the other hand, is when Javascript analyses the fields before actually submitting the data to the server.

Before we go into details, let's get a basic understanding of what we will be doing.

ajax form validating-51ajax form validating-83

If not you should only have to recreate that function, not the cross variable and script blocks.

You probably wont even need the cross variable as you do indeed define it again on the next script "validatefields.js".

That said, if you just can't do what he is suggesting, then replace the last line of your before Submit with the code Fliespl has put up.

When in comes to validating forms, there are basically two techniques you can use: 1) Server-side validation and 2) Client-side validation.

One extra note: j Query is used throughout the Java Script files. Pass your DB instance to the validate_input function. That has got to be the largest function I've ever seen!

Community Discussion