View button not working – JavaScript – SitePoint Forums

1675349809 cf11b3ed553d6c359d3dcc08377cc4b121fe8bf0


Hello everyone!

I am new to Javascript and am currently working on a project and would appreciate anyone’s help.
I have a form where I click the “View Resume” button, but I don’t see any client results.


  1. To display the array of values ​​within these elements for both the Education and Jobs objects, you must use the Object.values ​​method.

of. for “educationFor objects, prefix the array with “The highest level of education is “
b. for “jobsFor objects, prefix the array with the phrase “educated”.

The client selects from multiple selection options.
Education: Secondary Education
Work: No teaching experience.

Below is the HTML followed by my Javascript writing.


<div id="education1">
        <p>What is your highest level of education?</p>
        <select id="education-level">
          <option id="graduate" value="graduate">Graduate</option>
          <option id="secondary" value="secondary">Secondary</option>
 <div id="work-history1">
          With which of the following teaching areas do you have most
        <select id="areas">
          <option id="teaching-primary" value="Primary education">
            Primary education
          <option id="teaching-none" value="no audiences">
            I have no teaching experience
      <button id="calculate">Display my CV</button>

my Javascript

var calculate = document.getElementById("calculate");
var education1 = document.getElementById("education1");
var workHistory = document.getElementById("work-history1");
var submitBtn = document.getElementById("submit")

calculate.addEventListener("click", function() {
  var education = {
    levelKey: document.getElementById("education-level").value,
    mathmajorKey: document.getElementById("math-major").value,
  var work = {
    areaKey: document.getElementById("areas").value,
    yearsKey: document.getElementById("years").value,
  education1.innerHTML = "<p>Highest Level of education is college" + levelKey +
    "Did not have a math major</p>";

  workHistory.innerHTML = "<p>Experienced in teaching" + yearsKeys + ".</p>";
submitBtn.addEventListener("submit", function(e) {
  document.getElementById("submit").style.visibility = "visible";
  submitBtn.innerHTML =
    "<button id='submit' style=color:white; background:grey>CV Submitted</button>";

Hi @Loranne,

As pointed out in other threads, henceforth Click the button to format the selected code.

The button wraps the code with a backtick start and end ``` code here ```and make it easier to read.

thank you.


Source link

What do you think?

Leave a Reply

GIPHY App Key not set. Please check settings

    115651730 breaking promo 976

    UK to see shorter recession, says Bank of England

    Charleston e1455308576635

    Confederate Ironclad Attack on Charleston | Naval History Magazine