Questions
What did I do wrong? When you click on the small caption of the photo, it...

What did I do wrong? When you click on the small caption of the photo, it is supposed to have a call to AJAX that changes the small description of my fav activities to a bigger description.

For example, when you click "cooking" it should change to what I have in the biginfo file but it does not change.

This is the full code. The "biginfo" files I have are done,  don't have anything but the fuller description.  

HTML

_________________

<!DOCTYPE html>

<html>

<head>
<title>Slideshow</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta content="text/html; charset=iso-8859-2" http-equiv="Content-Type">
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<style>
.mySlides {display:none;}
.onPic{
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
color: black;
font-size: 12px;
}
</style>
</head>

<body>

<h2 class="w3-center">My Favorite Actitivies</h2>

<div class="w3-content w3-section" style="max-width:500px">
<div class="mySlides">
<img src="cooking.jpg" style="width:100%">
<button class="onPic" type="button" onclick="loadDoc1()">Cooking</button>
  
</div>

  
<div class="mySlides">
<img src="lacrosse.jpg" style="width:100%">
<button class="onPic" type="button" onclick="loadDoc2()">Lacrosse</button>
</div>
  
<div class="mySlides">
<img src="jogging.jpg" style="width:100%">
<button class="onPic" type="button" onclick="loadDoc3()">Jogging</button>
</div>
  
<div class="mySlides">
<img src="music.jpg" style="width:100%">
<button class="onPic" type="button" onclick="loadDoc4()">Listening to music</button>
</div>
  
<div class="mySlides">
<img src="dog.jpg" style="width:100%">
<button class="onPic" type="button" onclick="loadDoc3()">Playing with my dog</button>
</div>
  
<div class="mySlides">
<img src="tv.jpg" style="width:100%">
<button class="onPic" type="button" onclick="loadDoc4()">Watching TV</button>
</div>
  

</div>

<script>
var myIndex = 0;
carousel();
function carousel() {
var i;
var x = document.getElementsByClassName("mySlides");
for (i = 0; i < x.length; i++) {
x[i].style.display = "none";
  
}
myIndex++;
if (myIndex > x.length) {myIndex = 1}
x[myIndex-1].style.display = "block";
setTimeout(carousel, 7000); // Change image every 2 seconds
}
  
function loadDoc1() {
var xhttp1 = new XMLHttpRequest();
xhttp1.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
document.getElementById("demo").innerHTML = this.responseText;
}
};
xhttp1.open("GET", "biginfo1.txt", true);
xhttp1.send();
}

  
function loadDoc2() {
var xhttp2 = new XMLHttpRequest();
xhttp2.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
document.getElementById("demo").innerHTML = this.responseText;
}
};
xhttp2.open("GET", "biginfo2.txt", true);
xhttp2.send();
}
  
  
function loadDoc3() {
var xhttp3 = new XMLHttpRequest();
xhttp3.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
document.getElementById("demo").innerHTML = this.responseText;
}
};
xhttp3.open("GET", "biginfo3.txt", true);
xhttp3.send();
}

function loadDoc4() {
var xhttp3 = new XMLHttpRequest();
xhttp3.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
document.getElementById("demo").innerHTML = this.responseText;
}
};
xhttp3.open("GET", "biginfo4.txt", true);
xhttp3.send();
}
function loadDoc5() {
var xhttp3 = new XMLHttpRequest();
xhttp3.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
document.getElementById("demo").innerHTML = this.responseText;
}
};
xhttp3.open("GET", "biginfo5.txt", true);
xhttp3.send();
}
function loadDoc6() {
var xhttp3 = new XMLHttpRequest();
xhttp3.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
document.getElementById("demo").innerHTML = this.responseText;
}
};
xhttp3.open("GET", "biginfo6.txt", true);
xhttp3.send();
}

</script>

</body>
</html>

BIGINFO1

--------------------

"I like to cook because it is fun"

In: Computer Science

Summary Figure 3–79 shows an example page containing two applications of floating objects. In the first...

Summary

Figure 3–79 shows an example page containing two applications of floating objects. In the first line of Lincoln’s second inaugural speech a drop capital is created by floating the first letter of the first paragraph next to the surrounding text. The text of the speech is wrapped around the image of Lincoln using an irregular line wrap. This effect is created by cutting the Lincoln image into separate strips which are floated and stacked on top of each other. In this Coding Challenge you will explore how to create both effects.

Figure 3-79

Do the following:

1. Open the files code3-1.html and code3-1_float.css and in the comment section enter your name (First + Last) and the date (MM/DD/YYYY) into the Author: and Date: fields of the file.

2. Go to the code3-1.html file in your editor. Within the head section insert a link element linking the page to the code3-1_float.css style sheet file. Take some time to study the content of the page.

3.lOpen the file code3-1_float.css, and for all img elements create a style rule to set the height of the image to 3.3em. Float all img elements on the right margin, but only when the right margin is first cleared of any floats. (Hint: clear: right).

4. To create a drop cap insert a style rule for the selector p:first-of-type::first-letter and add the following styles:

  1. Float the element on the left margin.
  2. Set the font size to 4em and the line height to 0.8em.
  3. Set the size of the right margin and padding space to 0.1em. Set the bottom padding to 0.2em.

5. Display the first line of the speech in small caps by adding a style rule for the selector p:first-of-type::first-line that changes the font variant to small-caps and the font size to 1.4em.

6. Open the page in the browser preview and verify the layout of the page resembles that shown in Figure 3-79.

Code 3-1.HTML to be edited:

<!doctype html>

<html lang="en">

<head>

   <!--

   New Perspectives on HTML5 and CSS3, 8th Edition

   Tutorial 3

   Coding Challenge 1

   

   Author:

   Date:

   Filename: code3-1.html

   -->

   <meta charset="utf-8">

   <title>Coding Challenge 3-1</title>

   <link href="code3-1.css" rel="stylesheet" />

</head>

<body>

   <h1>Lincoln's Second Inaugural</h1>

   <p>The Almighty has his own purposes. "Woe unto the world because of offenses! For

      <img src="lincoln01.png" alt="" />

      <img src="lincoln02.png" alt="" />

      <img src="lincoln03.png" alt="" />

      <img src="lincoln04.png" alt="" />

      <img src="lincoln05.png" alt="" />

      <img src="lincoln06.png" alt="" />

      <img src="lincoln07.png" alt="" />

      <img src="lincoln08.png" alt="" />

      <img src="lincoln09.png" alt="" />

      <img src="lincoln10.png" alt="" />

      it must needs be that offenses come; but woe to that man by whom the offense

      cometh." If we shall suppose that American slavery is one of those offenses which,

      in the providence of God, must needs come, but which, having continued through his

      appointed time, he now wills to remove, and that he gives to both North and South

      this terrible war, as the woe due to those by whom the offense came, shall we discern

      therein any departure from those divine attributes which the believers in a living

      God always ascribe to him?

   </p>

   <p>Fondly do we hope &mdash; fervently do we pray &mdash; that this

      mighty scourge of war may speedily pass away. Yet, if God wills that it continue

      until all the wealth piled by the bondsman's two hundred and fifty years of unrequited

      toil shall be sunk, and until every drop of blood drawn by the lash shall be paid by

      another drawn with the sword, as was said three thousand years ago, so still it must

      be said, "The judgments of the Lord are true and righteous altogether."

   </p>

   <p>With malice toward none; with charity for all; with firmness in the right, as God

      gives us to see the right, let us strive on to finish the work we are in; to bind up

      the nation's wounds; to care for him who shall have borne the battle, and for his

      widow, and his orphan &mdash; to do all which may achieve and cherish a just and lasting peace

      among ourselves, and with all nations.

   </p>

</body>

</html>

Code 3-1.css to be edited:

@charset "utf-8";

/*

   New Perspectives on HTML5 and CSS3, 8th Edition

   Tutorial 3

   Coding Challenge 1

   Author:

   Date:   

   

   Filename: code3-1.css

*/

body {

   width: 900px;

   margin: 20px auto;

   font-family: Baskerville, "Palatino Linotype", Palatino, "Century Schoolbook L", "Times New Roman", "serif";

   font-size: 1.25em;

   padding-bottom: 30px;

}

h1 {

   font-size: 2.2em;

   text-align: center;

}

Code 3-1_float.css to be edited:

@charset "utf-8";

/*

   New Perspectives on HTML5 and CSS3, 8th Edition

   Tutorial 3

   Coding Challenge 1

   Author:

   Date:   

   

   Filename: code3-1_float.css

*/


Images being used:

  • lincoln01.png
  • lincoln02.png
  • lincoln03.png
  • lincoln04.png
  • lincoln05.png
  • lincoln06.png
  • lincoln07.png
  • lincoln08.png
  • lincoln09.png
  • lincoln10.png

In: Computer Science

A manufacturer is considering a switch from manufacturers’ representatives to an internal sales force. The following...

A manufacturer is considering a switch from manufacturers’ representatives to an internal sales force. The following cost estimates are available. Manufacturers’ reps are paid 8.1% commission and incur $600,000 in fixed costs, while an internal sales force has fixed costs projected at $1,900,000 and would receive 2.6% commission. Assume that sales revenue is double the breakeven volume or the point at which the manufacturer would be indifference between reps and an internal sales force. At this volume, how much would the manufacturer save, assuming the company had switched to an internal sales force? Report your answer in dollars.

In: Finance

The purpose of this homework is to test your knowledge of GUI. Consider a fictional park...

The purpose of this homework is to test your knowledge of GUI. Consider a fictional park where the entry price for 1 adult ticket is $50, and for 1 children ticket is $25. Write a simple GUI application that let user to enter the number of tickets and display the total price. The GUI should contain:

● One text field for the user to enter the number of adult tickets

● One text field for the user to enter the number of children tickets

● One button “Calculate total cost”

● One text field to display the total cost When the user clicks the button then the correct cost is displayed in the total price field. If the input text field is empty then it should be treated as 0 tickets.

In: Computer Science

Herman has a honey bee hive. The hive starts with a population of 50,000 bees, but...

Herman has a honey bee hive. The hive starts with a population of 50,000 bees, but because of environmental stresses the population decreases by 10% every year. Each bee lives exactly one season, and produces 1 gram of honey over its lifetime.

a) How many bees are left at the end of the fifth year?

b) How much total honey does the hive produce over five years?

explain all formulas and steps

In: Finance

// Lab Homework 11 // Logical Operator AND and OR // Demonstrate how to use a...

// Lab Homework 11
// Logical Operator AND and OR
// Demonstrate how to use a logical operator
// with a Boolean expression.

#include <iostream>
#include <cctype> // for tolower()
using namespace std;

int main()
{
   int numberOfCreditHours; // Number of credit hours student has completed
   float gpa; // The student's cumulative grade point average

   // Ask the user two questions:
   cout << "Answer the following questions:" << endl << endl;

   cout << "How many credit hours have you completed (0-200): ";
   cin >> numberOfCreditHours;

   cout << "What is your cumulative GPA (0.00-4.00)? ";
   cin >> gpa;

   cout << endl;

   // TODO: Students can petition for graduation if:
   // - they have completed 48+ credit hours
   // - they have a GPA of 2.0 or greater
   //
   // Use Logical operators in complex logical expressions to decide which of the following
   // four messages to print:
   //
   // 1) You may petition for graduation.
   // 2) You must raise your GPA before you can graduate.
   // 3) You must complete more credit hours before you can graduate.
   // 4) You must raise your GPA and complete more credits before graduating.
   //
   // Use just ONE of the logical operators below in the expression
   // to choose the approprate message. You MAY use the chosen operator
   //       more than once.
   //
   // Logical AND: &&
   // Logical OR: ||
   //
   // Note: Do NOT worry about situations where the user doesn't enter Y, y, N, or n

   // Use the if structure provided below.

   if // (<write a compound logic expression here for graduating>)
       //graduation message

   else if // (<write a compound logic expression here for too low gpa>)
       //raise gpa message

   else if // (<write a compound logic expression here for too few credits>)
       //complete more credits message

   else // else is good enough, no logic expression needed - it's the only other possibility
       // raise gpa and earn more credits message

   cout << endl << endl;

   return 0;
}

/* Sample interaction and output:

Test #1
==========================================
Answer the following questions:

How many credit hours have you completed (0-200): 60
What is your cumulative GPA (0.00-4.00)? 3.75

You may petition for graduation.

Press any key to continue . . .

Test #2
==========================================
Answer the following questions:

How many credit hours have you completed (0-200): 60
What is your cumulative GPA (0.00-4.00)? 1.99

You must raise your GPA before you can graduate.

Press any key to continue . . .

Test #3
==========================================
Answer the following questions:

How many credit hours have you completed (0-200): 47
What is your cumulative GPA (0.00-4.00)? 3.25

You must complete more credit hours before you can graduate.

Press any key to continue . . .

Test #4
==========================================
Answer the following questions:

How many credit hours have you completed (0-200): 45
What is your cumulative GPA (0.00-4.00)? 1.75

You must raise your GPA and complete more credits before graduating.

Press any key to continue . . .

*/

In: Computer Science

1- Select the characteristics that nearly all stratification systems share. (Select all characteristics that apply. You...

1- Select the characteristics that nearly all stratification systems share. (Select all characteristics that apply. You may choose more than one.)

The positioning of social categories tend to change quickly.

People’s opportunities and experiences are shaped by how their social categories are ranked.

The positioning of social categories tend to change slowly.

People are ranked in a hierarchy according to common characteristics.

People’s opportunities and experiences are shaped by the amount of effort they put into their work and their outlook on life.

People are ranked in a hierarchy according to personal characteristics.

2- One's class is not affected by race, gender or religion.

True

False

3- When the United States experienced a labor shortage during World War II, the government encouraged Mexicans to immigrate to the United States.    True or False

4- Play among young girls who stay with all-girl groups tends to reflect norms of encouragement and support, while young boys in same-gender groups develop a tendency toward more aggressive and competitive play.

           True

           False

In: Psychology

Prove that 2n+10 +n is O(2n)

Prove that 2n+10 +n is O(2n)

In: Computer Science

Julia and Cate want to go bungee jumping. Julia goes first. She has a mass of...

Julia and Cate want to go bungee jumping. Julia goes first. She has a mass of m and uses a bungee cord with the length of L and unknown springiness. However, Cate is very hesitant to go and wants to calculate how far she will drop before she is pulled back up. She has a mass 0.8 times Julia's mass. How far will Cate go down?

In: Physics

Problem 9-6AA Entries for payroll transactions LO P2, P3, P5 Francisco Company has 10 employees, each...

Problem 9-6AA Entries for payroll transactions LO P2, P3, P5

Francisco Company has 10 employees, each of whom earns $3,100 per month and is paid on the last day of each month. All 10 have been employed continuously at this amount since January 1. On March 1, the following accounts and balances exist in its general ledger:

  1. FICA—Social Security Taxes Payable, $3,844; FICA—Medicare Taxes Payable, $900. (The balances of these accounts represent total liabilities for both the employer's and employees' FICA taxes for the February payroll only.)
  2. Employees' Federal Income Taxes Payable, $7,750 (liability for February only).
  3. Federal Unemployment Taxes Payable, $372 (liability for January and February together).
  4. State Unemployment Taxes Payable, $2,480 (liability for January and February together).


During March and April, the company had the following payroll transactions.

Mar. 15 Issued check payable to Swift Bank, a federal depository bank authorized to accept employers' payments of FICA taxes and employee income tax withholdings. The $12,494 check is in payment of the February FICA and employee income taxes.
31 Recorded the journal entry for the March salaries payable. Then recorded the cash payment of the March payroll (the company issued checks payable to each employee in payment of the March payroll). The payroll register shows the following summary totals for the March pay period.
Salaries
Office
Salaries
Shop
Salaries
Gross
Pay
FICA
Taxes*
Federal
Income
Taxes
Net
Pay
$ 12,400 $ 18,600 $ 31,000 $ 1,922 $ 7,750 $ 20,878
$ 450

* FICA taxes are Social Security and Medicare, respectively.

31 Recorded the employer's payroll taxes resulting from the March payroll. The company has a merit rating that reduces its state unemployment tax rate to 4.00% of the first $7,000 paid each employee. The federal rate is 0.60%.
Apr. 15 Issued check to Swift Bank in payment of the March FICA and employee income taxes.
15 Issued check to the State Tax Commission for the January, February, and March state unemployment taxes. Filed the check and the first-quarter tax return with the Commission.
30 Issued check payable to Swift Bank in payment of the employer's FUTA taxes for the first quarter of the year.
30 Filed Form 941 with the IRS, reporting the FICA taxes and the employees' federal income tax withholdings for the first quarter.


Required:
Prepare journal entries to record the transactions and events for both March and April. (If no entry is required for a particular transaction, select "No journal entry required" in the first account field.)

In: Accounting

Two things can cause a budget variance; quantity and cost. Why is a flexible budget essential...

Two things can cause a budget variance; quantity and cost. Why is a flexible budget essential for managers? What departments are responsible for quantity variances? Cost variances?   As a manager why do you think it is necessary to differentiate these causes?

In: Accounting

Personally, getting a promotion gave me anxiety. Don't get me wrong, I was grateful for the...

Personally, getting a promotion gave me anxiety. Don't get me wrong, I was grateful for the new position. With my promotion came not only a raise, but more responsibilities and new tasks that I never thought I'd be capable of doing. Becoming an administrative manager from being a server was a big change for me. I was comfortable with being able to clock in and out only having to deal with customers. Now, I don't only deal with customers, I deal with all of the employees. I struggled with doing the inventory and being responsible with the food order. How many cases of ranch should I order? How many shredded lettuce bags do we run through a day? Maybe I can be faster in placing the order? Thankfully, I have a really good general manager who kept me motivated and positive when I let the stress get to me. She taught me her tricks and her ways of remembering certain food units and how I can properly read the labels in case I did forget. I focused in giving myself short term goals. For example, if I made a mistake on the inventory and counted ranch by the case instead of individual bags, I'd make sure the next time I did inventory I'd count by the bags. I made sure I stayed persistent in order to ensure I wouldn't make the same mistake twice. Once I got the inventory and food order down, I was excited to learn to do the invoices. My next step is to get promoted to being the assistant general manager.

comment on their post. Can you relate to them? Have you experienced something similar? Are you impressed? Do you have advice that may have helped them at the time?

In: Psychology

what is heavy metal contamination

what is heavy metal contamination

In: Chemistry

Make a program that swaps the three values. Three integer values are taken from the user...

  • Make a program that swaps the three values.
    • Three integer values are taken from the user input.
      • This work will be done by calling the function "getinput(num1, num2, num3)"
    • The input values are swapped each other by calling the function swap(num1, num2, num3)
      • example: values (a, b, c) will be (c, a, b) after the swap.
        • a = 10; b = 20; c = 30;
        • after function call,
          • a has 30, b has 10, and c has 20.

In: Computer Science

Please create (if not already in your linux home directory) files of any type. Once these...

Please create (if not already in your linux home directory) files of any type. Once these files are created, archive them, compress the archive and move these files to the thrash directory. This could be a script to be run from the shell or the script to be run from an executable file.

Submit your code and clearly explain all steps of your script.

In: Computer Science