
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Concept explainers
Question
6a. Configure an alert message to pop up using Javascript when the page is displayed in the browser. Edit the body tag as follows: <body onload="alert ('Today only-10% off on a weekend- coupon code ZenTen');"> . The onload event handler in this case pops up an alert message.
b. Add a script block to the head section as follows:
<script> function validateForm () { if (document.forms [0]. myEmail. value== "") {
(alert (Pleade enter an e-mail address."); return false // end if return true; } end function validateForm
</script>
Many thanks for your time! .
![TASK 3: ADD FORM DATA VALIDATION TO THE RESERVATIONS PAGE.
1. Launch a text editor and open the reservations.html file.
2.
You will configure form data validation for the Reservations page that requires an e-mail address to be
entered.
3. You have the option to complete this task with JavaScript OR to complete this task with jQuery. Choose
one or the other of the following options.
Option 1: Using JavaScript
4. Add a script block to the head section as follows:
<script> function validateForm () { if
(document.forms [0].myEmail.value
alert ("Please enter an e-mail address.");
return false; } // end if return true;
} // end function validateForm
==
</script>
) {
5. Edit the <form> tag as follows:
11
<form method="post" onsubmit="return validateForm (); '
action="http://webdevbasics.net/scripts/pacific.php">
Adapted from Felke-Morris, T. (2019). Web Development and Design Foundations with HTML5 (9th ed.). New York, NY: Pearson.](https://content.bartleby.com/qna-images/question/44ba76de-af0d-4898-b61f-d85a848ebf83/1199607f-fcf6-41fc-9107-de110372e2d4/a9f7pg_thumbnail.png)
Transcribed Image Text:TASK 3: ADD FORM DATA VALIDATION TO THE RESERVATIONS PAGE.
1. Launch a text editor and open the reservations.html file.
2.
You will configure form data validation for the Reservations page that requires an e-mail address to be
entered.
3. You have the option to complete this task with JavaScript OR to complete this task with jQuery. Choose
one or the other of the following options.
Option 1: Using JavaScript
4. Add a script block to the head section as follows:
<script> function validateForm () { if
(document.forms [0].myEmail.value
alert ("Please enter an e-mail address.");
return false; } // end if return true;
} // end function validateForm
==
</script>
) {
5. Edit the <form> tag as follows:
11
<form method="post" onsubmit="return validateForm (); '
action="http://webdevbasics.net/scripts/pacific.php">
Adapted from Felke-Morris, T. (2019). Web Development and Design Foundations with HTML5 (9th ed.). New York, NY: Pearson.

Transcribed Image Text:TASK 2: DISPLAY AN ALERT MESSAGE ON THE YURTS PAGE
1. Launch a text editor and open the yurts.html file.
2.
You will configure the yurts.html page so that an alert message will pop up when the page is displayed in the
browser.
3. You have the option to complete this task with JavaScript OR to complete this task with jQuery. Choose
one or the other of the following options.
Option 1: Using JavaScript
1. Edit the body tag as follows:
<body onload="alert ('Today only
ZenTen');">
10% off on a weekend
coupon code
2. The load event occurs when the web page begins to load in the browser. The onload event handler in this
case pops up an alert message.
3. Save the file and test it in the browser. Your display should be similar to Figure 1 below.
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by stepSolved in 7 steps with 4 images

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.Similar questions
- Topic: Server-Side Development (Control of User Input) In a paragraph, describe how you can control user input so it displays properly. For example, if someone uses <h1> in a text field, how are you going to prevent this from displaying as a level 1 heading when you later display this text?arrow_forwardThe code is below and use the code to answer the 3 questions that is attached as an image: #include <stdio.h>#include <stdlib.h>#include <unistd.h>#include <errno.h>#include <signal.h> void sigint_handler(int sig){ (void)sig; // remove unused variable warning write(0, "Ahhh! SIGINT!\n", 14);} int main(void){ void sigint_handler(int sig); /* prototype */ char s[200]; struct sigaction sa; sa.sa_handler = sigint_handler; sa.sa_flags = 0; // or SA_RESTART; sigemptyset(&sa.sa_mask); // if (sigaction(SIGINT, &sa, NULL) == -1) {// perror("sigaction");// exit(1);// } printf("Enter a string:\n"); if (fgets(s, sizeof s, stdin) == NULL) perror("fgets"); else printf("You entered: %s\n", s); return 0;}arrow_forwardUse this code and modify it so that it works according to the pics <!doctype html><html><head><script>function add(){var a,b,c;a=Number(document.getElementById("first").value);b=Number(document.getElementById("second").value);c=a+b;document.getElementById("answer").innerHTML = c; function isEven() {n=Number(document.getElementById("num").value);if (n%2 == 0)return 'The number is even';elsereturn 'The number is even'; }</script></head><body><h2> Sample Test</h2><h3> Question 1 </h3><p> Take two inputs from the user and write their sum when the calculate button is clicked.</p>Value 1: <input id="first"><br>Value 2:<input id="second"><br><br><div id="answer"></div><br><button onclick="add()">Calculate</button> <h3> Question 2 </h3><p> Take an input from the user and check if it is odd or even.</p>Value : <input…arrow_forward
- Edit the code to add a password and use json.stringify to store all the info correctly. Not as an object but to convert it to a string representation. Existing code: register.html <html><head><title>Registration Page</title><script src="./js/register.js"></script></head><body<br /><br /><form>Email:<input type="text" id="email" name="email"/> <br> <br> Phone:<input type="text" id="phone" name="phone"/> <br> <br> Address:<textarea id="address" name="address"> </textarea> <br> <br> City:<input type="text" id="city" name="city"/> <br> <br> State:<input type="text" id="state" name="state"/> <br> <br> ZIP Code:<input type="text" id="zip" name="zip"/> <br> <br> Contact Me:<input type="radio" id="contact" name="contact" value="text"/> Text <input type="radio" id="contact" name="contact"…arrow_forwardRegister the textSize event handler to handle focus changes for the input tag. Note: The function counts the number of characters in the input. HTML JavaScript 1 let inputElement = document.getElementById("userName"); 2 3 function textSize(event) { document.getElementById("stringLength").innerHTML = event.target.value.length; 5 } 4 7 /* Your solution goes here */ 8 inputElement.addEventListenerC"text", stringLength); 2 Check Try againarrow_forwardomplete this javascript file according to the individual instructionsgiven in the comments. *** DO NOT CHANGE any of the code that you are not instructed to. */ ////////////////////////// NOTE: Use the API endpoints available at// https://jsonplaceholder.typicode.com/// to get the data required in these exercises.// HINT: Read the documented Resources and Routes.// Also the guide:// https://jsonplaceholder.typicode.com/guide//////////////////////// Create a function named "getUser".// This function needs to accept a "userID"// parameter.// Use Fetch with Async/Await to request// the data for the requested user.// The function should return JSON data.arrow_forward
- 6-Fully explain the following code and draw all possible outputs. { $(document).ready(function() $("button").click(function () { $("#div1").remove(); }); }); This is some text in the div. This is a paragraph in the div. This is another paragraph in the div. Remove div elementarrow_forwardBean Counter - Chapter 18 - Use your TEXT editor to build the Bean Counter program - Save each version (Versions 0 - 10) - Final Version should work! Start with this code for VERSION O in your text editor! Save as BeanV0.html charset="UTF-8"> The Bean Counter Confirming that bean.html works var drink = "latte"; var ounce = 12; var shots = 2; var taxRate = 0.088; var price; if (drink == "espresso") price = 1.40; if (drink if (ounce :== "latte" || drink == "cappuccino") { 8) price = 1.95; if (ounce == 12) price = 2.35; if (ounce == 16) price = 2.75; } if (drink == "Americano") price = 1.20 + 0.30*(ounce/8); "expresso") price = price + (shots - 1)*.50; if (drink == price = price + price*taxRate; alert(price); html>arrow_forward1.0Write a PHP echo statement to find out the user who owns the current script being run. 2.Complete the following code such that it determines when a script was last changed. echo date('g:i a, j M Y',___);arrow_forward
- The following HTML is loaded into the browser: a) When the user clicks on the blue region around the button, what will happen?b) When the user clicks “Click me!”, what will happen?arrow_forwardSTEP 1: Begin work within your Jupyter Notebook by importing the following modules: import numpy as np import pandas as pd from matplotlib import pyplot as plt import re Jupyter Notebooks Q1. Within your Jupyter Notebook, write the code for a Python function called def parseWeatherByYear(year) : This function will parse an html page containing weather for an entire year of data for the city of Toronto. The html pages containing weather data can be downloaded from: https://www.extremeweatherwatch.com/cities/toronto/year-2023 The file to parse for this lab however can be downloaded here: https://matrix.senecacollege.ca/~danny.abesdris/prg550.232/labs/lab6/torontoWeather.2023.html The html file itself contains markers as where to begin parsing the data to extract. The 3 pieces of data that must be extracted consist of the high and low temperatures (in degrees Celsius) as well as the amount of precipitation (in cm) for every day so far in the current year (2023). A series…arrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education

Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON

Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education