Design a HTML document that will display the following: 1. A header that reads “Please enter your name”. 2. Two text boxes with labels ‘First Name’ and ‘Last Name’. 3. A label “Gender”. Three radio buttons with labels: “Male”, “Female” and “Other”. The label and all three radio buttons should be in a single row. 4. A button with text “Submit”. Write a servlet program that will: 1. When you enter a first name “John”, a last name “Doe”, click on the radio button “Male” and click on the button “Submit”, display a response on the webpage “Welcome to my Shop” as a header and a message “Thank you Mr. John Doe.” 2. When you enter a first name “Jane”, a last name “Doe”, click on the radio button “Female” and click on the button “Submit”, a response on the webpage will display “Welcome to my Shop” as a header and a message “Thank you Ms. Jane Doe.” 3. When you enter a first name “John”, a last name “Doe”, click on the radio button “Other” and click on the button “Submit”, a response on the webpage will display “Welcome to my Shop” as a header and a message “Thank you John Doe.” The following error cases with an appropriate error message should be displayed on the webpage: 1) User doesn’t enter text data for first name and/or last name and clicks on “Submit”. 2) When either a first name or a last name is not entered and the user clicks on the “Submit” button. 3) When no radio button is checked and the user clicks on the “Submit” button.
Design a HTML document that will display the following: 1. A header that reads “Please enter your name”. 2. Two text boxes with labels ‘First Name’ and ‘Last Name’. 3. A label “Gender”. Three radio buttons with labels: “Male”, “Female” and “Other”. The label and all three radio buttons should be in a single row. 4. A button with text “Submit”. Write a servlet program that will: 1. When you enter a first name “John”, a last name “Doe”, click on the radio button “Male” and click on the button “Submit”, display a response on the webpage “Welcome to my Shop” as a header and a message “Thank you Mr. John Doe.” 2. When you enter a first name “Jane”, a last name “Doe”, click on the radio button “Female” and click on the button “Submit”, a response on the webpage will display “Welcome to my Shop” as a header and a message “Thank you Ms. Jane Doe.” 3. When you enter a first name “John”, a last name “Doe”, click on the radio button “Other” and click on the button “Submit”, a response on the webpage will display “Welcome to my Shop” as a header and a message “Thank you John Doe.” The following error cases with an appropriate error message should be displayed on the webpage: 1) User doesn’t enter text data for first name and/or last name and clicks on “Submit”. 2) When either a first name or a last name is not entered and the user clicks on the “Submit” button. 3) When no radio button is checked and the user clicks on the “Submit” button.
Chapter13: Handling Events
Section: Chapter Questions
Problem 4E
Related questions
Question
Design a HTML document that will display the following:
1. A header that reads “Please enter your name”.
2. Two text boxes with labels ‘First Name’ and ‘Last Name’.
3. A label “Gender”. Three radio buttons
with labels: “Male”, “Female” and “Other”. The label and all
three radio buttons should be in a single row.
4. A button with text “Submit”.
Write a servlet program that will:
1. When you enter a first name “John”, a last name “Doe”, click on
the radio button “Male” and click on the button “Submit”, display
a response on the webpage “Welcome to my Shop” as a header and a
message “Thank you Mr. John Doe.”
2. When you enter a first name “Jane”, a last name “Doe”, click on
the radio button “Female” and click on the button “Submit”, a
response on the webpage will display “Welcome to my Shop” as a
header and a message “Thank you Ms. Jane Doe.”
3. When you enter a first name “John”, a last name “Doe”, click on
the radio button “Other” and click on the button “Submit”, a
response on the webpage will display “Welcome to my Shop” as a
header and a message “Thank you John Doe.”
The following error cases with an appropriate error message should
be displayed on the webpage:
1) User doesn’t enter text data for first name and/or last name and
clicks on “Submit”.
2) When either a first name or a last name is not entered and the
user clicks on the “Submit” button.
1. A header that reads “Please enter your name”.
2. Two text boxes with labels ‘First Name’ and ‘Last Name’.
3. A label “Gender”. Three radio buttons
with labels: “Male”, “Female” and “Other”. The label and all
three radio buttons should be in a single row.
4. A button with text “Submit”.
Write a servlet program that will:
1. When you enter a first name “John”, a last name “Doe”, click on
the radio button “Male” and click on the button “Submit”, display
a response on the webpage “Welcome to my Shop” as a header and a
message “Thank you Mr. John Doe.”
2. When you enter a first name “Jane”, a last name “Doe”, click on
the radio button “Female” and click on the button “Submit”, a
response on the webpage will display “Welcome to my Shop” as a
header and a message “Thank you Ms. Jane Doe.”
3. When you enter a first name “John”, a last name “Doe”, click on
the radio button “Other” and click on the button “Submit”, a
response on the webpage will display “Welcome to my Shop” as a
header and a message “Thank you John Doe.”
The following error cases with an appropriate error message should
be displayed on the webpage:
1) User doesn’t enter text data for first name and/or last name and
clicks on “Submit”.
2) When either a first name or a last name is not entered and the
user clicks on the “Submit” button.
3) When no radio button is checked and the user clicks on the
“Submit” button.
“Submit” button.
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
![Microsoft Visual C#](https://www.bartleby.com/isbn_cover_images/9781337102100/9781337102100_smallCoverImage.gif)
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
![Microsoft Visual C#](https://www.bartleby.com/isbn_cover_images/9781337102100/9781337102100_smallCoverImage.gif)
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,