And we welcome any constructive suggestions to improve this example.

Now, when you have finished learning how to validate a sample registration form using Java Script, let us take you to the another way doing the same thing.

validating user input with javascript-74validating user input with javascript-8validating user input with javascript-56

You can view this Sample Java Script Registration From Validation Example in a separate browser window and check how the validation is working.

We would like to hear from you regarding this document.

(16 printed pages) Introduction Getting Started Writing the Validation Script Connecting the Form to the Script Associating Form Fields with Custom Script Code Listing Conclusion When you create forms, providing form validation is useful to ensure that your customers enter valid and complete data.

For example, you may want to ensure that someone inserts a valid e-mail address into a text box, or perhaps you want to ensure that someone fills in certain fields.

But this time, the instead of on submitting the form, validations are on field level, i.e. Sure that will be preety interesting to learn and share as well.

by Christopher Heng, Many websites, like, have a feedback form of some sort so that visitors can make comments to the webmasters.When the user does so, they may proceed and can supply value to the next available field.The later Java Script function created is called on the onsubmit event of the form. If Male or Female is selected, it generates an alert saying that the form is successfully submitted and it reloads the form.Sending data back and forth between the client and server can cause some delays.However, for some form functions, server-side validation is necessary.Following pictorial shows in which field, what validation we want to impose.