4 Java Script Assignment No 41
4 Java Script Assignment No 41
Assignment No. - 4
TITLE
PROBLEM STATEMENT
Write a program to design registration form for students by using HTML, CSS& Java Script and
perform following validations: all fields mandatory, Name,phone number and email address validation.
OUTCOMES
THEORY-CONCEPT
Advantages:
Increased interactivity
Richer interfaces
Validation:
When client enters the all necessary data and press the submit button form validation is
done at server side If data entered by a client is incorrect or missing,the server needs to send all
data back to the client and request for resubmission of form with correct information. This is
really a lengthy process which puts a lot of load(burden) on the server.
So, JavaScript provides a way to validate form's data on the client's side itself before sending it
to the web server. Form validation performs two functions-
Basic Validation –First of all the form must be checked to make sure all the mandatory
fields are filled in. It would require just a loop through each field in the form and check
for the data.
Data Format Validation − Secondly, the data that is entered must be checked for correct
format and its value. The code must include appropriate logic to test correctness of data.
TECHNOLOGY/TOOL
JavaScript can be implemented using JavaScript statements that are placed within the <script>.
You can place the <script> tags, containing your JavaScript, anywhere within your web page,
but it is normally recommended that you should keep it within the <head> tags.
Language − This attribute specifies what scripting language you are using. Typically, its
value will be JavaScript. Although recent versions of HTML (and XHTML, its
successor) have phased out the use of this attribute.
Type − This attribute is what is now recommended to indicate the scripting language in
use and its value should be set to "text/javascript".
Web Technology Lab Manual
DESIGN/EXECUTION STEPS
TEST CASES
CONCLUSION/ANALYSIS
ORAL QUESTIONS