Validation and event handling in javascrip

Assignment Help JAVA Programming
Reference no: EM13761825

Purpose: You are going to learn basic form validation and event handling in JavaScript.

Requirements: To complete this project you will write and submit one HTML file containing embedded CSS and JavaScript. The file will be called lab2.html. This file contains a registration form, which can be styled any way you like subject to the requirements below. This file must be an ASCII file (i.e. a plain text document with a .html extension). You may create it with any editor but you must ensure that it is a text file. In other words, it should not contain anything except ASCII characters (including HTML tags/CSS rules/JavaScript and
content).

YOU MAY USE A WYSIWYG EDITOR! This editor can be used to generate the HTML markup of your document. Any CSS or JavaScript must be subsequently added to this file by hand (i.e. manually editing the HTML file). This lab will be a simple registration form. Every visible form input should be labeled with explanatory text. The form should have the following inputs:

• First and last name (2 separate text fields)
o The user should enter only letters in each field, with the first letter capitalized
• Student ID number (a text field)
o The user should enter a 9 digit number
• Biography (a textarea)
o The user may enter up to 25 words
• Calculator
o The calculator should have a text field where result is displayed  If the user types in the text field, as long as the result is numeric, it can be used - (typing in the text field clears previous contents) If the user types non-numeric data in the text field, when the user presses any button, the text field should change to "ERROR: press C"

The calculator should have 18 buttons (of button input type) 0-9 buttons, laid out any way you like

  •  These start a new number with the corresponding digit value if no number has been entered yet, or append the corresponding digit value to a number C button, which clears the result text field, and current calculated result, leaving the result text field blank
  •  = button, which performs the last operation pressed and generates a new result in the result text field
  •  +, -, /, and * buttons, which append the corresponding operation to the expression
  • a button labeled << which shifts the current calculator result to the left (examples: 12345 becomes 23450. 2468 becomes 4680. 0 becomes 0.)
  •  a button labeled >> which shifts the current calculator result to the right (examples: 12345 becomes 1234. 2468 becomes 246. 0 becomes 0.)

The following examples demonstrate exactly how the calculator should behave. Do not deviate from this behavior, nor display any additional characters nor expressions in the

result field.

  •  EXAMPLE

• User presses 2 button (2 is displayed in result)
• User presses + button
• User presses 4 button (4 is displayed in result)
• User presses = button (6 is displayed in result)

  •  EXAMPLE

• User presses C to clear display
• User presses 2 button (2 is displayed in result)
• User presses 4 button (24 is displayed in result)
• User presses / button
• User presses 3 button (3 is displayed in result)
• User presses = button (8 is displayed in result)

  •  EXAMPLE

• User presses C to clear display
• User presses 2 button (2 is displayed in result)
• User presses 4 button (24 is displayed in result)
• User presses / button
• User presses 1 button (1 is displayed in result)
• User presses 2 button (12 is displayed in result)
• User presses = button (2 is displayed in result)

  •  EXAMPLE

• User presses C to clear display
• User types 24 in result field (24 is displayed in result)
• User presses / button
• User presses 1 button (1 is displayed in result)
• User presses 2 button (12 is displayed in result)
• User presses = button (2 is displayed in result)

  •  EXAMPLE

• User presses C to clear display
• User types 24h in result field (24h is displayed in result)
• User presses / button ("ERROR: press C" is displayed in result)
o User must press C to clear result

Reference no: EM13761825

Questions Cloud

Auditor role and responsibilities : Compare the primary auditor objectives in auditing historical financial statements to auditing internal controls over financial reporting. Identify at least two (2) objectives that are the most significant in reducing the risk of reporting errors ..
List all of the variables that you will use : List all of the variables that you will use (use valid variable names). Indicate whether the data type is string, integer, or double, and so on
Determine the medium through which the office staff prefers : Determine the medium through which the office staff prefers to communicate, wether it is a presentation, e-mail or a printed presentation.
Concept of double taxation : 1. Please describe the concept of "double taxation" and discuss which entity(ies) are subject to this type of taxation.
Validation and event handling in javascrip : To complete this project you will write and submit one HTML file containing embedded CSS and JavaScript. The file will be called lab2.html. This file contains a registration form, which can be styled any way you like subject to the requirements be..
Diffusion innovation model : The general health promotion proposal (DIABETES REDUCTION).
Information security profile for your organization : Submit an Information Security Profile for your organization. This project requires you to summarize the required controls and describe the security posture of your organization based on its selected Information security standard
What moral would the people draw from the zuni prayer : Which fable is most applicable to your life, and how? What moral would the people draw from the Zuni prayer? What is the foggiest point in the lecture or reading? Explain why and how so!
What is the estimated amount of time for implementation : Determine the medium through which the office staff prefers to communicate, wether it is a presentation, e-mail or a printed presentation. Knowing my audience will help me to understand their specific needs and not just the message that I want to ..

Reviews

Write a Review

JAVA Programming Questions & Answers

  Java program to read line of text which ends with period

Write down the java program which will read the line of text which ends with the period, which serves as sentinel value. Show all the letters which occur in the text.

  Write a code fragment that would printout the multiplication

Write a code fragment that would printout the multiplication table for the number 3 multiplied by (1-10) .

  Write java program to accept two words as input

Write a Java program that accepts two words as input and determines if one of them is resulting from changing the order of the others' letters.

  Develop a graphical user interface based java program

Develop a Java program that can communicate with a real SMTP email server for sending emails. TNE 60003 - introduction to network programming, You program should provide a GUI and can successfully send the SMTP commands to the mail server

  Simulate a simple multiuser computer system

Prepare a java program to simulate a simple multiuser computer system

  Write down java program for furniture company

Write down a Java program for the furniture company. Ask user to select P for Pine, O for Oak or M for Mahogany. Illustrate price of table manufactured with chosen wood.

  Write an application that displays a table of the pythagorea

Write an application that displays a table of the Pythagorean triples for side1, side2 and the hypotenuse, all no larger than 100.

  Development of a simple program involving multiple classes

Development of a Simple Program Involving Multiple Classes and development of a basic Class, development of the Country and World classes

  The objective is to implement a menu-based system

The objective is to implement a menu-based system for Bank Accounts in order to simulate a very simple banking system. Many structures have to be declared to manage bank accounts.

  Describe the equivalence classes

Prove that these relations on the set of all functions from Z to Z are equivalence relations. Describe the equivalence classes.

  Prepare an address book to save the complete information

Prepare an address book to save the complete information of the person - Define the class Address that can store a street address, city, state, and zip code. Use the appropriate methods to print and store the address.

  Create and implement class called date to store month

Create and Implement the class called Date which has data members to store month (as a number), day, year, and name of month.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd