For this example we've set the width of the modal window to 360 pixels. There are also some issues with the stacking order of elements in IE8 which may require some tweaking if the background isn't visible.to avoid any erroneous data to be inserted into the database. So let us learn some basics because I have written this article only focusing on beginners and students. Example I hope you now understand the basics of validation in Java Script, now let us create the one sample web application that demonstrates how to do validation.
In this document, we have discussed Java Script Form Validation using a sample registration form.Please refer to the errata for this document, which may include some normative corrections.The previous errata for this document, are also available. This document is also available in these non-normative formats: XML and XHTML with color-coded revision indicators.Server Side Validation Validation done at the server level after sending the form data to the server but before entering the data into the database is called server-side validation. The first page source code Look at the preceding source code closely; see the id's of controls that play the important role in Java Script validation by reading the ASP. The design view of the preceding source code will look as in the following: I hope you have created the same form as above for demonstration purposes. Net controls values in Java Script are as: There are three main methods shown in the above image in the red square to read the ASP.Net controls values; they are:get Element By Id: this method is used to read the controls values by their Element By Name: this method is used to read the controls values by their Element By Tag Name: this method is used to read the controls values by their Tag Name.