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.

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter13: Handling Events
Section: Chapter Questions
Problem 4E
icon
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. 
3) When no radio button is checked and the user clicks on the
“Submit” button. 
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Form and its Elements
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.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,