After the user enters the phone number, pop up a Good Luck alert message ➢ use onblur and name your function goodLuck()

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

HTML BASED QUESTION

After the user enters the phone number, pop up a Good Luck alert message ➢ use onblur and name your function goodLuck()

❖ Add an empty paragraph just below the name field. After the user enters the name, populate the new paragraph with the text “Have we met before, ?”

❖ Add an empty paragraph just below the select field. After selecting a favorite dish, change the background color of the select paragraph and the new paragraph to a new color, and add text to the new paragraph that says “Good choice”.

❖ Add an empty paragraph just below the restaurant rating field. When the user selects 4 or below, add text to the new paragraph that says “Are you sure?”; when the user selects 6 or above, use the text “Great”. 

❖ When the user clicks Reset, show an alert that says “Get it right this time!” and change the background of the page to a bright color.

❖ Add an empty paragraph just below the Submit button area. When the user clicks Submit, first check that the phone number is not empty. If it is empty, add text to the paragraph that says “Tricked you--phone number is required!” and prevent the submission. The text should be in red color, with a gray background for the paragraph. If the phone field is NOT empty, then add text to the paragraph that says “Thanks--can I call you tomorrow?”. You choose the colors for this one, but make it different than the red and gray.

****************************************************************

Here is the code i have so far

 

<!DOCTYPE html>
<html>

<head> Donta's Food Fusion </head>
  <head lang=“en”>
    <title> Donta's Food Fusion </title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>  

</head>
  <body>

<br/>
<div> Survey </div>


<div>
<br/>

<hX> Help us serve you better :

<br/>  

<form>
<legend> Survey</legend>

<p>
  <label> First Name: </label>
  <input type="text" name="fName" />
</p>

<p>
  <label> Last Name: </label>
  <input type="text" name="lName" />
</p>

<p> "Have we met before <insert the name he/she typed here>?" </p>


<p>
  <label> Email Address: </label>
  <input type="email" name="email" />
</p>

<p>
  <label> Phone Number: </label>
  <input type="tel" name="phone" />
</p>

<input type="text" onblur="GoodLuck()">

<script>
function GoodLuck() {
  alert("Good Luck");
}

<p>
<label>Favorite Dish:</label>
 <select name="favorite">
 <option>Choose your favorite dish</option>
 <option>Chicken & Waffles</option>
 <option>French Toast</option>
 <option>Bacon Burger</option.
 <option>Pizza</option>
 <option>Bacon Cheese Fries</option>
 <option>Bonless Wings</option>
 <option>Chicken Alfredo</option>
 <option>Ribeye Steak</option>
 </select>
<p> "Good choice" </p>
</p>

<p>
  <label>Rating of Restaurant</label>

Bad
<input type="range" min="0" max="10" step="1" name="happiness" />
Good
</p>

<p>
<label>Date: <br/>
<input type="date" .../>
</p>

<p>
<input type="time" .../>
</p>

<p>
<label> Permission to publish survey</label>
<input type="checkbox" name="yes" name="no"
</p>

<p>
  <label> Comments: </label>
  <textarea rows="3" cols="25">Text<textarea>
</p>

 <input type="submit" />
 
 <input type="reset"/>

</form>

 

 

 

 


<footer>

Copyright 2021 </footer>

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY