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

  A java program that will prompt the user to input a file

Write a Java program that will prompt the user to input a file (document) in order to count the frequency of each word. This program will display the frequency of each word sorted alphabetically or by frequency (depending on the preference of the use..

  E-marketing-e-commerce consultant

You are an e-marketing and e-commerce consultant. Mary and Joe Johnson, the owners of Book Bunker, have hired you to help them improve their sales both online and in their store.

  Create wheel 360 degree

You have to create wheel, 360 degree. That is numbered 0-36. it is supposed to be spun, and randomly lands on one of the numbers.

  Java program on eclipse

Using a while( true ) loop,and using the upper case alphabeth from Z to A,print the lower case alphabeth and its corresponding ascii values.You must terminate/exit/break this loop once you process the last letter (A).

  Setting up the form page

Download and save the attached comment CGI mailer script form-mail2.pl to your server's cgi-bin directory, and change the permissions on the script to make it executable (not writable).

  Write servlet code for accepting two numbers from user

Write the servlet code for accepting two numbers from user show addition and multiplication of numbers. If error occurs, then call JSP error page to display suitable error message.

  Javascript program that asks the use

Design a javascript program that asks the user for a username with at least eight characters, beginning with a letter and including at least one digit. Next, write a validation loop to ensure that these conditions have been met

  Numerical solution of a two-point boundary-value problem

How to combine both Secant and Runge-Kutta methods and make it to the two-point boundary-value - Numerical Solution of a Two-Point Boundary

  The reference to the abstract class

Explain what happens when the reference to the abstract class X is used to execute method M1( ). X obj = new Y( ); obj.M1( );

  What is a nested inner class

What is a nested inner class? What special privileges does a nested inner class have? Give an example of how you declare a nested inner class

  Write a method named validate to help a local banker

write a method named validate to help a local banker. Your method will need to utilize two input parameters and the method's return value (for its output).

  These test scores into an array and computes:

Write a program that reads these test scores into an array and computes:Sum of the test scores after dropping the minimum test scoreAverage of the test scores

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