Please help me with this. I am not understanding what to do. So the code below is supposed to display images when  the checkboxed are clicked and display nothing when they are unclicked,. Dont worry about the css code JS function p01Func() {   document.getElementById("description").innerHTML = "A mother joins an underground band of vigilantes to try to rescue her daughter from a state-run institution.";   document.getElementById("poster").src = "images/night_raiders_poster.jpg";   document.getElementById("poster").style.display = "block";   document.getElementById("director").src = "images/night_raiders_director.jpg";   document.getElementById("director").style.display = "none";   document.getElementById("actors").src = "images/night_raiders_actors.jpg";   document.getElementById("actors").style.display = "none";   document.getElementById("check1").checked = false;   document.getElementById("check2").checked = false;   document.getElementById("check3").checked = false; } function checkUncheck1() {  if (document.getElementById("check1").checked) {    document.getElementById("poster").style.display = "inline";  } else {    document.getElementById("poster").style.display = "none";  } } function checkUncheck2() {  if (document.getElementById("check2").checked) {    document.getElementById("director").style.display = "inline";  } else {    document.getElementById("director").style.display = "none";  } } function checkUncheck3() {  if (document.getElementById("check3").checked) {    document.getElementById("actors").style.display = "inline";  } else {    document.getElementById("actors").style.display = "none";  } }     HTML     EECS1012: Lab 3               My Computational Thinking Kit                   Ex 4 + 5       Ex4 + 5             Movie             Director             Actors             (c) Author of this web page:

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Please help me with this. I am not understanding what to do. So the code below is supposed to display images when  the checkboxed are clicked and display nothing when they are unclicked,. Dont worry about the css code

JS

function p01Func() {
  document.getElementById("description").innerHTML = "<p>A mother joins an underground band of vigilantes to try to rescue her daughter from a state-run institution.</p>";

  document.getElementById("poster").src = "images/night_raiders_poster.jpg";

  document.getElementById("poster").style.display = "block";

  document.getElementById("director").src = "images/night_raiders_director.jpg";

  document.getElementById("director").style.display = "none";

  document.getElementById("actors").src = "images/night_raiders_actors.jpg";

  document.getElementById("actors").style.display = "none";

  document.getElementById("check1").checked = false;
  document.getElementById("check2").checked = false;
  document.getElementById("check3").checked = false;
}

function checkUncheck1() {
 if (document.getElementById("check1").checked) {
   document.getElementById("poster").style.display = "inline";
 } else {
   document.getElementById("poster").style.display = "none";
 }
}

function checkUncheck2() {
 if (document.getElementById("check2").checked) {
   document.getElementById("director").style.display = "inline";
 } else {
   document.getElementById("director").style.display = "none";
 }
}

function checkUncheck3() {
 if (document.getElementById("check3").checked) {
   document.getElementById("actors").style.display = "inline";
 } else {
   document.getElementById("actors").style.display = "none";
 }
}

 

 

HTML

<!DOCTYPE html>
<html lang="En">


<head>
  <meta charset="UTF-8">
  <title> EECS1012: Lab 3 </title>
  <!-- in Ex1, add a link tag here to connect it to the css file -->
  <link rel="stylesheet" href="movies_ex4.css" type="text/css" >
  <!-- in Ex2, add a script tag here to connect it to the js file -->
  <script src="movies_ex4.js" type="text/javascript"></script>
</head>
<body>


  <header>
    <h1>My Computational Thinking Kit</h1>
    <nav>


      <!-- In Ex4, add an attribute onclick to this button -->  
      <button>Ex 4 + 5</button>
      <button onclick="p01Func()">Ex4 + 5</button>


    </nav>
  </header>


  <div class="column1 poster">
    <input id="check1" type="checkbox" onclick="checkUncheck1()"> Movie
    <img id="poster" src="path/to/images/solaris/solaris_poster.jpg" alt="Movie Poster" />
  </div>
  <div class="column2 director">
    <input id="check2" type="checkbox" onclick="checkUncheck2()"> Director
    <img id="director" src="path/to/images/solaris/solaris_director.jpg" alt="Director" />
  </div>
  <div class="column3 actors">
    <input id="check3" type="checkbox" onclick="checkUncheck3()"> Actors
    <img id="actors" src="path/to/images/solaris/solaris_actors.jpg" alt="Actors" />
  </div>

 

  <div id="description" class="description"></div>


  <footer>(c) Author of this web page: <span><!-- In Ex 1, add your name --></span> </footer>
</body>
</html>

 

The images you will assign the the Movie, Director, and Actors sections are
night_raiders_poster.jpg, night_raiders_director.jpg, and night_raiders_actors.jpg respectively.
The following picture illustrates what you should see when Ex4+5 is clicked and all checkboxes
are checked:
Movie
My Computational Thinking Kit
Ex2 + 3
Ex 4+ 5
✔Director
A mother joins an underground band of vigilantes to try to rescue her daughter from a state-run institution.
Actors
Transcribed Image Text:The images you will assign the the Movie, Director, and Actors sections are night_raiders_poster.jpg, night_raiders_director.jpg, and night_raiders_actors.jpg respectively. The following picture illustrates what you should see when Ex4+5 is clicked and all checkboxes are checked: Movie My Computational Thinking Kit Ex2 + 3 Ex 4+ 5 ✔Director A mother joins an underground band of vigilantes to try to rescue her daughter from a state-run institution. Actors
Expert Solution
steps

Step by step

Solved in 4 steps with 6 images

Blurred answer
Knowledge Booster
Properties of CSS
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
Database System Concepts
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)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education