Create a program that writes user input from a text box

Assignment Help JAVA Programming
Reference no: EM131876641

Assignment: JAVASCRIPT PROGRAMING

In this exercise, you will create a program that writes user input from a text box to a list on the web page. Your program will also write a than-you message to the page after the user has entered five items. Finally, you will create an event listener for the Submit button.

1-In your text editor, open index.htm from the files provided by your instructor. Enter your name and today's date where indicated in the comment section in the document head.

2-At the bottom of the document, before the closing </body> tag, create a script section.

3-Withing the script section create two global variables: one named i with a value of 1, and the other named listItem with its value set an empty string.

4-Below the variables, create a function called processInput(). Within the function, create an if statement that runs if the value of i is less than or equal to 5. The if statement should perform the following actions:

a-Set the value of the listItem variable to the string "item" concatenated with the value of i.
b-Set the content of the element with an id of toolbox.
c-Set the value of the element with the id of toolbox to an empty string.

5-Before closing the } of the if statement, create a nested if statement. If the value of i is equal to 5, the statement should change the content of the element with the id of resultExpl to the string "Thank you for your suggestions."

6-Before closing the } of the main if statement, after the nested if statement, add a statement to increment the value of i by 1.

7-Add an event listener for the click event of the Submit button (with the id of button).

8-Add comments to document your work, and then save your work. Open index.html in a browser, type the name of a tool in the text box, and then click Submit. The name of the tool you typed is added to the bulleted list on the right side of the web page. Enter the names of four more tools, clicking Submit after each one. After you enter the fifth name, the text "Thanks you for your suggestions." is displayed below the bullted list, as shown in the Figure below.

9-Fix any errors in your code until it works as you expect.

Attachment:- Project-Assignment.rar

Reference no: EM131876641

Questions Cloud

Determine the contractors fee : A new commercial development is planned. A design-build approach will be used as the project delivery system.
What problems can occur in a continuous-media system : What problems can occur in a continuous-media system if data is delivered either too slowly or too fast?
Determine the number of operating hours : E & T Excavation Company is planning an investment of $466,600 for a bulldozer. The bulldozer is expected to operate for 2,000 hours per year for 10 years.
Plot the deseasonlized data on the same graph : Deseasonlize car sales. Plot the deseasonlized data on the same graph as the original data. Comment on the two graphs.
Create a program that writes user input from a text box : Assignment: JAVASCRIPT PROGRAMING- In this exercise, you will create a program that writes user input from a text box to a list on the web page.
Write a function that takes no input parameters : Write a function that takes no input parameters and returns nothing (void). Inside the function, create a variable of type int, and give that variable a value.
What will be the average annual cost of ownership : What will be the average annual cost of ownership during the next five years if interest is 6%?
Find the service level : A news-stand buys a weekly magazine from a publisher once every week at $3 per copy. It sells the magazine at $5 per copy.
Would you trust a neural network with your life : Would you trust a neural network with your life? For instance, would you get in a plane about to be flown by a neural network?

Reviews

Write a Review

JAVA Programming Questions & Answers

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

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