JavaScript and PHP: Using jQuery to Validate on Submit


show more Validating on submit with jQuery provides you with in-depth training on Developer. Taught by Ray Villalobos as part of the Validating and Processing Forms with JavaScript and PHP show less
please wait ...

Validating on submit with jQuery

Let's get busy implementing some validation using jQuery. I'm going to start off with the same form from chapter three but I've added decode to include jQuery right here. My javascript file right now is empty so we'll start with that. First things first, whenever we are working with JQuery, we need to do things after both jQuery and the entire page have loaded. JQuery has a special event called ready. We'll start our form script by using that method. We want to capture the Submit event so we are going to use JQuery's Submit method.

To make things more backwards compatible, it's always better to use jQuerys methods instead of java scripts. They're built to be more compatible with older browsers. We can easily make sure that we choose each required field by using this selector. So we're going to choose all the input fields that have the required attribute in them. Now, I want to go through each of the fields with the required attribute so ...

Validating on submit with jQuery
Video duration: 3m 45s 2h 51m Intermediate

Viewers:

Validating on submit with jQuery provides you with in-depth training on Developer. Taught by Ray Villalobos as part of the Validating and Processing Forms with JavaScript and PHP

Subjects:
Developer Web
Software:
JavaScript PHP
Author:
please wait ...