Web Development and Design Foundations with HTML5 (9th Edition) (What's New in Computer Science)
9th Edition
ISBN: 9780134801148
Author: Terry Felke-Morris
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Question
Chapter 14, Problem 6HOE
Program Plan Intro
Program Plan:
- Include the HTML tag using “<html>”.
- Include the heading tag using “<head>”.
- Open the title tag using “<title>” with appropriate title and close the tag.
- Set the “meta” tag using “<meta>”.
- Open the style tag “<style>” to make style for HTML tags.
- Make a style for “input” type.
- Set the display as “block”.
- Set the “margin-bottom” as “1em”.
- Make a style for “label” element and set the properties of label.
- Make a style for “submit” element with margin-left property.
- Make a style for “input” type.
- Open the script tag using “<script>”.
- Define the function named “validateForm()” to validate the user name, age and city.
- Check the condition for user name, if user name is “Null” then display the alert message and return “false”.
- Check the condition for age. If user’s age is less than 18 display the alert message and return “false”.
- Check the condition for city input. If the input box for city is “Null” then display the alert message “City field cannot be empty” and return “false”.
- Display the alert message for valid inputs and return “true”.
- Define the function named “validateForm()” to validate the user name, age and city.
- Close the script tag using “</script>”.
- Close the head tag using “</head>”.
- Open the heading tag with appropriate heading using “<h1>” tag and close it.
- Open the form tag with “post” method, when the “onsubmit” event handler clicks by the user the “validateForm()” function called to validate the inputs.
- Create the additional label and input type for “City” input.
- Close the form tag using “</form>”.
- Close the body tag using “</body>”.
- Include the heading tag using “<head>”.
- Close the file using “</html>” tag.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
Most forms on websites will usually have some sort of test to confirm that the user is a human and
not a bot. Update the contact form that you created in Part 3. Add a field to the form that asks the
user for the answer to a simple maths problem. The form should only be submitted if the user
provides the successful answer to the maths problem. For example you may ask the user what 3 + 4
equals. The form will only be successfully submitted if the user provides 7 as the answer.
If the user provides the incorrect answer to the maths problem, you should display a bold red error
message to the user on the page by manipulating the DOM. The message should be diplayed in the
same location on the page as the form validation error message from Part 3. If the user provides the
correct answer to the maths problem, then the form should be submitted and the user should
receive the bold green success message from part 3. Once part 4 is complete the user should receive
an error message if: • The form…
Write JavaScript codes to validate a name text field so that when a user submits the form with
the name field empty or with numeric value an alert message should be displayed to the user.
The form submission should be accepted when the user enters a non-numeric value with a
success alert message.
That answer is wrong. Can you please read the instructions.
Chapter 14 Solutions
Web Development and Design Foundations with HTML5 (9th Edition) (What's New in Computer Science)
Ch. 14.4 - Prob. 1CPCh. 14.4 - Prob. 2CPCh. 14.4 - Prob. 3CPCh. 14.6 - Prob. 1CPCh. 14.6 - Prob. 2CPCh. 14.6 - Prob. 3CPCh. 14.8 - Describe a method that can be used to gather a...Ch. 14.8 - Prob. 2CPCh. 14.8 - Prob. 3CPCh. 14.9 - Prob. 1CP
Ch. 14.9 - Prob. 2CPCh. 14.9 - Prob. 3CPCh. 14.18 - Prob. 1CPCh. 14.18 - Prob. 2CPCh. 14.18 - Prob. 3CPCh. 14 - Prob. 1MCCh. 14 - Prob. 2MCCh. 14 - Prob. 3MCCh. 14 - Prob. 4MCCh. 14 - Prob. 5MCCh. 14 - Prob. 6MCCh. 14 - Prob. 7MCCh. 14 - Prob. 8MCCh. 14 - Prob. 9MCCh. 14 - Prob. 10MCCh. 14 - Prob. 11MCCh. 14 - Prob. 12FIBCh. 14 - Prob. 13FIBCh. 14 - The ________ object is assumed to exist and it is...Ch. 14 - Prob. 15FIBCh. 14 - A form control button can be used with a(n)...Ch. 14 - Prob. 17FIBCh. 14 - Prob. 18FIBCh. 14 - Prob. 19SACh. 14 - Prob. 20SACh. 14 - Prob. 1AYKCh. 14 - Prob. 2AYKCh. 14 - Prob. 3AYKCh. 14 - Prob. 1HOECh. 14 - Prob. 2HOECh. 14 - Prob. 3HOECh. 14 - Prob. 4HOECh. 14 - Prob. 5HOECh. 14 - Prob. 6HOECh. 14 - Prob. 7HOECh. 14 - Prob. 8HOECh. 14 - Prob. 1WRCh. 14 - Prob. 2WRCh. 14 - Prob. 3WR
Knowledge Booster
Similar questions
- Select the statement below that is true about forms. Select one: a. All of these are true. b. The <form> tag is optional. c. It is recommended to use mailto: as the action on a form since that is the easiest for the web developer. d. A form can be used to pass information to a program or script on the web server.arrow_forwardIs it so, or am I wrong? The Text element of a newly generated form initially contains the name of the form. This is done at the beginning of the setup process.arrow_forwardAs stated in the last module, this week you will exchange your draft with a partner so they can review it with the rubric. The goal of this exchange is to help mold and rework your draft for submission by Saturday. Because this is a quick turnaround, please make sure you complete the review of your peer’s paper by Thursday so that they will have time to make any changes prior to submission. Additionally, posting your draft prior to Tuesday is strongly encouraged as this will allow additional time for your peer to review your draft. Remember, in total, your research paper needs to be written and formatted using the APA style guide and should include 5-6 pages of text. Your page requirement does not include the cover page, abstract, or reference page. Your research paper should also include a minimum of 3-4 reputable sources. Apa research paper on prymidsarrow_forward
- incorrect solution. different with the screenshotarrow_forwardCreate an anonymous block that returns the number of students in a section. Prompt for section id.B. Create an anonymous block that return the average numeric grade for a section. Prompt for sectionid and return the average grade.arrow_forwardCHALLENGE ACTIVITY 462500.3140334.qx3zqy7 Jump to level 1 Write multiple if statements: If car_year is before 1968, print "Probably has few safety features." (Without quotes). If after 1970, print "Probably has seat belts." If after 1991, print "Probably has anti-lock brakes." If after 2000, print "Probably has tire-pressure monitor." End each phrase with period and newline. Remember that print() automatically adds a newline. Ex: car_year=1995 prints: Probably has seat belts. Probably has anti-lock brakes. int(input()) Your code goes here UAWN H 4.7.2: If-else statements. 1 car_year 2 3 4 5 = www 1 2arrow_forward
- Thank you very much for your help. I do need the btnSubmitPrice to work when clicked though, and via the assignment given, I cannot have an InputBox unless I am also allowed to have the btnSubmitPrice to be clicked when a user adds another item. When a user adds another item, the txtTotalSales and txtAverageSalePrice have to change as well and update with the new values. I do not know how to do this. I tried moving the text under btnSubmitPrice_Click instead of FrmMain_Load and it did not work.arrow_forwardImplement the "Replace player" menu option. Prompt the user for the jersey number of the player to replace. If the player is in the roster, then prompt again for a new jersey number and rating. Update the replaced player's jersey number and rating.Ex: Enter a jersey number: 4 Enter a new jersey number: 12 Enter a rating for the new player: 8arrow_forwardAssignment Create a video showing how your game runs, play the game and explain how it plays. (don't worry about code in video).arrow_forward
- Indicate a rotation code that would rotate the object on the left to obtain the view shown on the right. There may be more than one correct answer; this question will be graded manually. Type the rotation code using +/- and X/Y/Z. For example if the first rotation is positive around the z axis and the second rotation is negative around the y axis, type +Z Y. 2.arrow_forwardYou have a board divided into N xN squares and two robots, R1 and R2. Each square on the board has a number written on it R1 starts at the top left corner square of the board and R2 starts at the top right corner square of the board. Your aim is to move the robots so that R1 reaches the bottom right corner square and R2 reaches the bottom left corner square. You have a remote control with two buttons, blue and yellow, that control the robots as follows. • Whenever you press the blue button, R1 moves one square to the right and R2 moves one square down. • Whenever you press the yellow button, R1 moves one square down and R2 moves one square left. The robots are not allowed to move off the board-if pushing a button would force either one of the robots to move off the board, the button push has no effect and both robots stay where they are. For each robot, you compute a score which is the sum of the numbers on the squares that it visits along the path that it follows from its starting…arrow_forwardNeed help with this. I attached how it should look Create an event listener for the click event occurring with the submitButton that runs an anonymous function. Within the anonymous function add the following if else structure: If the pwd field fails the pattern match, display the validation message “Your password must be at least 8 characters with at least one letter and one number”. Else if the value of the pwd field does not equal the value of the pwd2 display the validation message “Your passwords must match”. Otherwise, set the validation message to an empty text string. Save your changes to the file and then open project06-01 in your web browser. Verify that you cannot submit the form if your password is less than eight characters long and does not include at least one number and one letter. Verify that you cannot submit the form if the two passwords do not match.arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Programming with Microsoft Visual Basic 2017Computer ScienceISBN:9781337102124Author:Diane ZakPublisher:Cengage Learning
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning