Cs101-Assignment 4



Requirement: You are required to design a HTML web page which can generate and display simple Mathematical table(s) with the help of JavaScript, by getting input from users. (Marks 35)

Objectives:
In this assignment you will learn:
1.      How to create HTML tables, input text fields and submit buttons.
2.      How to perform Input text field validation through JavaScript.
3.      Use of if-else and loops in JavaScript.
4.      How to create and use functions in JavaScript.
5.      How to generate HTML tables dynamically.

Please read the instructions carefully.
1.      Your assignment must be in HTML format; any other format even simple text files (notepad files) will not be accepted.
2.      Open notepad, write your code in this new file and save it. While it asks for file name, use starting and ending double quotes to save the file in HTML format like “VUID.html”. 
3.      Create a function ValidateStartField to validate the start input field.  Use onChange event in this function.
4.      Create a function ValidateEndField to validate the end input field.  Use onChange event in this function.
5.      Create a function ValidateSizeField to validate the depth/size field. Use onChange event in this function.
6.      Create a function GenerateTables and write the code to generate math tables.
7.      Create a function DisplyTable and write the code to display a math table on HTML page.
8.      To create HTML elements with the help of JavaScript pass HTML code to document.write( ) function as string. For example if you want to create HTML table with the help of JavaScript write
document.write( “<table border="1"><tr><td>1</td><td>2</td></tr><tr><td>3</td><td>4</td></tr></table>” );
9.      For more details see screen shots.