Javascript code for validating name

Rated 3.99/5 based on 891 customer reviews

It is important to validate the form submitted by the user because it can have inappropriate values. The Java Script provides you the facility the validate the form on the client side so processing will be fast than server-side validation.

So, most of the web developers prefer Java Script form validation.

username and password, As user clicks on login button, Java Script validation function comes into act.

var attempt = 3; //Variable to count number of attempts ............ Element By Id("username").disabled = true; Element By Id("password").disabled = true; Element By Id("submit").disabled = true; return false; } } }/* Below line is used for online Google font */ @import url(

Microsoft® Office Front Page® 2003 allows you to create some custom validation within the form feature.

(For more information on how to create form validation using the Front Page form feature, see About creating forms in Front Page 2003.) However, if the form validation provided in Front Page does not suit your needs or the site on which you are working is hosted on a server that does not have Front Page Server Extensions from Microsoft installed, you may need to create custom form validation.

Note Front Page Server Extensions are a set of programs that provide access to special Front Page features, such as database processing, form processing, hit counters, and other built-in Front Page components that require server-side processing.

You can provide custom validation for your forms in two ways: server-side validation and client-side validation.

The zip file contains the javascript file, examples.The “validation descriptor” is nothing but a string specifying the type of validation to be performed.Each field in the form can have zero one or more validations. More info & downloads where Do My Validation One() and Do My Validation Two() are custom functions for validation. [a-z] : It matches characters from lowercase ‘a’ to lowercase ‘z’. If by mistake, user skips entering any detail, soon the alert message appear on the form. escaping - by -) [0-9] : It matches digital number from 0-9. That means, you could be very sure about the form, whether users have entered the details or not.

Leave a Reply