title: ReferenceError: function is not defined at HTMLInputElement.onclick
body: <p>There is a possibility to select an excel file. Then click on upload and the code will get started. When I press the 'upload' button I get the </p>
  
  <blockquote>
    <p>'(index): 57 Uncaught ReferenceError: Upload is not defined<br>
         at HTMLInputElement.onclick '</p>
  </blockquote>
  
  <p>I tried to place the <code>&lt;script&gt;</code> in the head, within the <code>&lt;body&gt;</code> in the beginning and at the end of the page, now I have separated the js file from the html file and it is loaded in the head.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var aerobic = ['Totalbalance', 'Powerpump', 'HIT training', 'Cardio Fitness', 'Yoga'];
  var crossbox = ['WOD- les', 'Circuit training'];
  
  function Upload() {
      //Reference the FileUpload element.
      var fileUpload = document.getElementById("fileUpload");
  
      //Validate whether File is valid Excel file.
      var regex = /^([a-zA-Z0-9\s_\\.\-:])+(.xls|.xlsx)$/;
      if (regex.test(fileUpload.value.toLowerCase())) {
          if (typeof (FileReader) != "undefined") {
              var reader = new FileReader();
  
              //For Browsers other than IE.
              if (reader.readAsBinaryString) {
                  reader.onload = function (e) {
                      ProcessExcel(e.target.result);
                  };
                  reader.readAsBinaryString(fileUpload.files[0]);
              } else {
                  //For IE Browser.
                  reader.onload = function (e) {
                      var data = "";
                      var bytes = new Uint8Array(e.target.result);
                      for (var i = 0; i &lt; bytes.byteLength; i++) {
                          data += String.fromCharCode(bytes[i]);
                      }
                      ProcessExcel(data);
                  };
                  reader.readAsArrayBuffer(fileUpload.files[0]);
              }
          } else {
              alert("This browser does not support HTML5.");
          }
      } else {
          alert("Please upload a valid Excel file.");
      }
  }
  
  function ProcessExcel(data) {
      //Read the Excel File data.
      var workbook = XLSX.read(data, {
          type: 'binary'
      });
  
      //Fetch the name of First Sheet.
      var firstSheet = workbook.SheetNames[0];
  
      //Read all rows from First Sheet into an JSON array.
      var excelRows = XLSX.utils.sheet_to_row_object_array(workbook.Sheets[firstSheet]);
  
      //Create a HTML Table element.
      var table = document.createElement("table");
      table.border = "1";
  
      //Add the header row.
      var row = table.insertRow(-1);
  
      //Add the header cells.
      var headerCell = document.createElement("TH");
      headerCell.innerHTML = "Datum";
      row.appendChild(headerCell);
  
      headerCell = document.createElement("TH");
      headerCell.innerHTML = "Starttijd";
      row.appendChild(headerCell);
  
      headerCell = document.createElement("TH");
      headerCell.innerHTML = "Eindtijd";
      row.appendChild(headerCell);
  
      headerCell = document.createElement("TH");
      headerCell.innerHTML = "Activiteit";
      row.appendChild(headerCell);
  
      //Add the data rows from Excel file.
      for (var i = 0; i &lt; excelRows.length; i++) {
          //Add the data row.
          var row = table.insertRow(-1);
  
          //Add the data cells.
          var cell = row.insertCell(-1);
          cell.innerHTML = excelRows[i].Datum;
  
          cell = row.insertCell(-1);
          cell.innerHTML = excelRows[i].Starttijd;
  
          cell = row.insertCell(-1);
          cell.innerHTML = excelRows[i].Eindtijd;
  
          cell = row.insertCell(-1);
          cell.innerHTML = excelRows[i].Activiteit;
      }
  
  
  
      sortDates(excelRows);
  }
  
  
  
  function sortDates(excelRows) {
      // var spinning = [];
      var rest = [];
      var thisWeek = [];
  
  
      var curr = new Date; // get current date
      var first = curr.getDate() - curr.getDay(); // First day is the day of the month - the day of the week
      var last = first + 7; // last day is the first day + 6
  
      var firstday = new Date(curr.setDate(first));
      var lastday = new Date(curr.setDate(last));
  
      for (var i = 0; i &lt; excelRows.length; i++) {
          var parts = excelRows[i].Datum.split('-');
          var mydate = new Date(Date.UTC(parts[2], parts[1] - 1, parts[0]));
          if (new Date(mydate) &gt; new Date(firstday) &amp;&amp; new Date(mydate) &lt; new Date(lastday)) {
              thisWeek.push(excelRows[i]);
          } else {
              rest.push(excelRows[i]);
          }
      }
  
      splitWeek(thisWeek);
  }
  
  function splitWeek(thisWeek) {
  
  
      var mondayData = [];
      var tuesdayData = [];
      var wednesdayData = [];
      var thursdayData = [];
      var fridayData = [];
      var saturdayData = [];
      var sundayData = [];
  
      var curr = new Date; // get current date
      var mon = curr.getDate() - curr.getDay(); // First day is the day of the month - the day of the week
      var monday = new Date(curr.setDate(mon));
  
      var tue = curr.getDate() - curr.getDay() + 1; // First day is the day of the month - the day of the week
      var tuesday = new Date(curr.setDate(tue));
  
      var wed = curr.getDate() - curr.getDay() + 2; // First day is the day of the month - the day of the week
      var wednesday = new Date(curr.setDate(wed));
  
      var thu = curr.getDate() - curr.getDay() + 3; // First day is the day of the month - the day of the week
      var thursday = new Date(curr.setDate(thu));
  
      var fri = curr.getDate() - curr.getDay() + 4; // First day is the day of the month - the day of the week
      var friday = new Date(curr.setDate(fri));
  
      var sat = curr.getDate() - curr.getDay() + 5; // First day is the day of the month - the day of the week
      var saturday = new Date(curr.setDate(sat));
  
      var sun = curr.getDate() - curr.getDay() + 6; // First day is the day of the month - the day of the week
      var sunday = new Date(curr.setDate(sun));
  
      for (var i = 0; i &lt; thisWeek.length; i++) {
          var parts = thisWeek[i].Datum.split('-');
          var mydate = new Date(Date.UTC(parts[2], parts[1] - 1, parts[0]));
  
          if (mydate &gt; monday &amp;&amp; mydate &lt; tuesday) {
              mondayData.push(thisWeek[i]);
          }
          if (mydate &gt; tuesday &amp;&amp; mydate &lt; wednesday) {
              tuesdayData.push(thisWeek[i]);
          }
          if (mydate &gt; wednesday &amp;&amp; mydate &lt; thursday) {
              wednesdayData.push(thisWeek[i]);
          }
          if (mydate &gt; thursday &amp;&amp; mydate &lt; friday) {
              thursdayData.push(thisWeek[i]);
          }
          if (mydate &gt; friday &amp;&amp; mydate &lt; saturday) {
              fridayData.push(thisWeek[i]);
          }
          if (mydate &gt; saturday &amp;&amp; mydate &lt; sunday) {
              saturdayData.push(thisWeek[i]);
          }
          if (mydate &gt; sunday) {
              sundayData.push(thisWeek[i]);
          }
  
      }
  
      // writeData(sortMonday(mondayData));
  
  
      viewMonday(sortMonday(mondayData));
      viewTuesday(sortTuesday(tuesdayData));
      viewWednesday(sortTuesday(wednesdayData));
      viewThursday(sortThursday(thursdayData));
      viewFriday(sortFriday(fridayData));
      viewSaturday(sortSaturday(saturdayData));
      viewSunday(sortSunday(sundayData));
  }
  
  
  function sortMonday(monday) {
  
  
      var aerobicMonday = [];
  
      var crossboxMonday = [];
  
      for (var i = 0; i &lt; monday.length; i++) {
          if (aerobic.includes(monday[i].Activiteit)) {
              aerobicMonday.push(monday[i]);
          }
          if (crossbox.includes(monday[i].Activiteit)) {
              crossboxMonday.push(monday[i]);
          } else {
  
          }
      }
      //return toevoegen  overal behalve maandag
      return [aerobicMonday, crossboxMonday];
  }
  
  function sortTuesday(tuesday) {
  
  
      var aerobicTuesday = [];
  
      var crossboxTuesday = [];
  
      for (var i = 0; i &lt; tuesday.length; i++) {
          if (aerobic.includes(tuesday[i].Activiteit)) {
              aerobicTuesday.push(tuesday[i]);
          }
          if (crossbox.includes(tuesday[i].Activiteit)) {
              crossboxTuesday.push(tuesday[i]);
          } else {
  
          }
      }
  
      return [aerobicTuesday, crossboxTuesday];
  
  }
  
  function sortWednesday(wednesday) {
  
  
      var aerobicWednesday = [];
  
      var crossboxWednesday = [];
  
      for (var i = 0; i &lt; wednesday.length; i++) {
          if (aerobic.includes(wednesday[i].Activiteit)) {
              aerobicWednesday.push(wednesday[i]);
          }
          if (crossbox.includes(wednesday[i].Activiteit)) {
              crossboxWednesday.push(wednesday[i]);
          } else {
  
          }
      }
  
      return [aerobicWednesday, crossboxWednesday];
  
  }
  
  function sortThursday(thursday) {
  
  
      var aerobicThursday = [];
  
      var crossboxThursday = [];
  
      for (var i = 0; i &lt; thursday.length; i++) {
          if (aerobic.includes(thursday[i].Activiteit)) {
              aerobicThursday.push(thursday[i]);
          }
          if (crossbox.includes(thursday[i].Activiteit)) {
              crossboxThursday.push(thursday[i]);
          } else {
  
          }
      }
  
      return [aerobicThursday, crossboxThursday];
  
  }
  
  
  function sortFriday(friday) {
  
  
      var aerobicFriday = [];
  
      var crossboxFriday = [];
  
      for (var i = 0; i &lt; friday.length; i++) {
          if (aerobic.includes(friday[i].Activiteit)) {
              aerobicFriday.push(friday[i]);
          }
          if (crossbox.includes(friday[i].Activiteit)) {
              crossboxFriday.push(friday[i]);
          } else {
  
          }
      }
  
      return [aerobicFriday, crossboxFriday];
  
  }
  
  
  function sortSaturday(saturday) {
  
  
      var aerobicSaturday = [];
  
      var crossboxSaturday = [];
  
      for (var i = 0; i &lt; saturday.length; i++) {
          if (aerobic.includes(saturday[i].Activiteit)) {
              aerobicSaturday.push(saturday[i]);
          }
          if (crossbox.includes(saturday[i].Activiteit)) {
              crossboxSaturday.push(saturday[i]);
          } else {
  
          }
      }
  
      return [aerobicSaturday, crossboxSaturday];
  
  }
  
  function sortSunday(sunday) {
  
  
      var aerobicSunday = [];
  
      var crossboxSunday = [];
  
      for (var i = 0; i &lt; sunday.length; i++) {
          if (aerobic.includes(sunday[i].Activiteit)) {
              aerobicSunday.push(sunday[i]);
          }
          if (crossbox.includes(sunday[i].Activiteit)) {
              crossboxSunday.push(sunday[i]);
          } else {
  
          }
      }
      return [aerobicSunday, crossboxSunday];
  }
  
  function viewMonday(mondayData) {
  
      var aerobic = "";
      var crossbox = "";
      if (mondayData[0].length &gt; 0) {
          for (var i = 0; i &lt; mondayData.length; i++) {
              aerobic += '&lt;p&gt;' + '&lt;b&gt;' + mondayData[0][i].Starttijd + ' t/m ' + mondayData[0][i].Eindtijd + '&lt;/b&gt; - ' + mondayData[0][i].Activiteit + '&lt;/p&gt;'
          }
      } else {
          aerobic = "geen lessen";
      }
  
  
      if (mondayData[1].length &gt; 0) {
          for (var i = 0; i &lt; mondayData.length; i++) {
              crossbox += '&lt;p&gt;' + '&lt;b&gt;' + mondayData[1][i].Starttijd + ' t/m ' + mondayData[1][i].Eindtijd + '&lt;/b&gt; - ' + mondayData[1][i].Activiteit + '&lt;/p&gt;'
          }
      } else {
          crossbox = "geen lessen";
      }
  
      document.getElementById("monday-aerobic").innerHTML = aerobic;
      document.getElementById("monday-crossbox").innerHTML = crossbox;
  
  }
  
  function viewTuesday(tuesdayData) {
  
  
  
      var aerobic = "";
      var crossbox = "";
      if (tuesdayData[0].length &gt; 0) {
          for (var i = 0; i &lt; tuesdayData[0].length; i++) {
              aerobic += '&lt;p&gt;' + '&lt;b&gt;' + tuesdayData[0][i].Starttijd + ' t/m ' + tuesdayData[0][i].Eindtijd + '&lt;/b&gt; - ' + tuesdayData[0][i].Activiteit + '&lt;/p&gt;'
          }
      } else {
          aerobic = "geen lessen";
      }
  
  
  
      if (tuesdayData[1].length &gt; 0) {
          for (var i = 0; i &lt; tuesdayData[1].length; i++) {
              crossbox += '&lt;p&gt;' + '&lt;b&gt;' + tuesdayData[1][i].Starttijd + ' t/m ' + tuesdayData[1][i].Eindtijd + '&lt;/b&gt; - ' + tuesdayData[1][i].Activiteit + '&lt;/p&gt;'
          }
      } else {
          crossbox = "geen lessen";
      }
  
  
      document.getElementById("tuesday-aerobic").innerHTML = aerobic;
      document.getElementById("tuesday-crossbox").innerHTML = crossbox;
  
  }
  
  function viewWednesday(wednesdayData) {
  
      var aerobic = "";
      var crossbox = "";
      if (wednesdayData[0].length &gt; 0) {
          for (var i = 0; i &lt; wednesdayData[0].length; i++) {
              aerobic += '&lt;p&gt;' + '&lt;b&gt;' + wednesdayData[0][i].Starttijd + ' t/m ' + wednesdayData[0][i].Eindtijd + '&lt;/b&gt; - ' + wednesdayData[0][i].Activiteit + '&lt;/p&gt;'
          }
      } else {
          aerobic = "geen lessen";
      }
  
  
  
      if (wednesdayData[1].length &gt; 0) {
          for (var i = 0; i &lt; wednesdayData[1].length; i++) {
              crossbox += '&lt;p&gt;' + '&lt;b&gt;' + wednesdayData[1][i].Starttijd + ' t/m ' + wednesdayData[1][i].Eindtijd + '&lt;/b&gt; - ' + wednesdayData[1][i].Activiteit + '&lt;/p&gt;'
          }
      } else {
          crossbox = "geen lessen";
      }
  
  
      document.getElementById("wednesday-aerobic").innerHTML = aerobic;
      document.getElementById("wednesday-crossbox").innerHTML = crossbox;
  
  }
  
  function viewThursday(thursdayData) {
  
      var aerobic = "";
      var crossbox = "";
      if (thursdayData[0].length &gt; 0) {
          for (var i = 0; i &lt; thursdayData[0].length; i++) {
              aerobic += '&lt;p&gt;' + '&lt;b&gt;' + thursdayData[0][i].Starttijd + ' t/m ' + thursdayData[0][i].Eindtijd + '&lt;/b&gt; - ' + thursdayData[0][i].Activiteit + '&lt;/p&gt;'
          }
      } else {
          aerobic = "geen lessen";
      }
  
  
  
      if (thursdayData[1].length &gt; 0) {
          for (var i = 0; i &lt; thursdayData[1].length; i++) {
              crossbox += '&lt;p&gt;' + '&lt;b&gt;' + thursdayData[1][i].Starttijd + ' t/m ' + thursdayData[1][i].Eindtijd + '&lt;/b&gt; - ' + thursdayData[1][i].Activiteit + '&lt;/p&gt;'
          }
      } else {
          crossbox = "geen lessen";
      }
  
  
      document.getElementById("thursday-aerobic").innerHTML = aerobic;
      document.getElementById("thursday-crossbox").innerHTML = crossbox;
  
  }
  
  function viewFriday(fridayData) {
      console.log(fridayData);
      var aerobic = "";
      var crossbox = "";
      if (fridayData[0].length &gt; 0) {
          for (var i = 0; i &lt; fridayData[0].length; i++) {
              aerobic += '&lt;p&gt;' + '&lt;b&gt;' + fridayData[0][i].Starttijd + ' t/m ' + fridayData[0][i].Eindtijd + '&lt;/b&gt; - ' + fridayData[0][i].Activiteit + '&lt;/p&gt;'
          }
      }
      else {
          aerobic = "geen lessen";
      }
  
  
      if (fridayData[1].length &gt; 0) {
          for (var i = 0; i &lt; fridayData[1].length; i++) {
              crossbox += '&lt;p&gt;' + '&lt;b&gt;' + fridayData[1][i].Starttijd + ' t/m ' + fridayData[1][i].Eindtijd + '&lt;/b&gt; - ' + fridayData[1][i].Activiteit + '&lt;/p&gt;'
          }
      } else {
          crossbox = "geen lessen";
      }
  
  
      document.getElementById("friday-aerobic").innerHTML = aerobic;
      document.getElementById("friday-crossbox").innerHTML = crossbox;
  
  }
  
  
  function viewSaturday(saturdayData) {
  
      var aerobic = "";
      var crossbox = "";
      if (saturdayData[0].length &gt; 0) {
          for (var i = 0; i &lt; saturdayData[0].length; i++) {
              aerobic += '&lt;p&gt;' + '&lt;b&gt;' + saturdayData[0][i].Starttijd + ' t/m ' + saturdayData[0][i].Eindtijd + '&lt;/b&gt; - ' + saturdayData[0][i].Activiteit + '&lt;/p&gt;'
          }
      }
      else {
          aerobic = "geen lessen";
      }
  
  
      if (saturdayData[1].length &gt; 0) {
          for (var i = 0; i &lt; saturdayData[1].length; i++) {
              crossbox += '&lt;p&gt;' + '&lt;b&gt;' + saturdayData[1][i].Starttijd + ' t/m ' + saturdayData[1][i].Eindtijd + '&lt;/b&gt; - ' + saturdayData[1][i].Activiteit + '&lt;/p&gt;'
          }
      } else {
          crossbox = "geen lessen";
      }
  
  
      document.getElementById("saturday-aerobic").innerHTML = aerobic;
      document.getElementById("saturday-crossbox").innerHTML = crossbox;
  
  }
  
  function viewSunday(sundayData) {
  
      var aerobic = "";
      var crossbox = "";
      if (sundayData[0].length &gt; 0) {
          for (var i = 0; i &lt; sundayData[0].length; i++) {
              aerobic += '&lt;p&gt;' + '&lt;b&gt;' + sundayData[0][i].Starttijd + ' t/m ' + sundayData[0][i].Eindtijd + '&lt;/b&gt; - ' + sundayData[0][i].Activiteit + '&lt;/p&gt;'
          }
      } else {
          aerobic = "geen lessen";
      }
  
  
  
      if (sundayData[1].length &gt; 0) {
          for (var i = 0; i &lt; sundayData[1].length; i++) {
              crossbox += '&lt;p&gt;' + '&lt;b&gt;' + sundayData[1][i].Starttijd + ' t/m ' + sundayData[1][i].Eindtijd + '&lt;/b&gt; - ' + sundayData[1][i].Activiteit + '&lt;/p&gt;'
          }
      } else {
          crossbox = "geen lessen";
      }
  
  
      document.getElementById("sunday-aerobic").innerHTML = aerobic;
      document.getElementById("sunday-crossbox").innerHTML = crossbox;
  
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;head&gt;
   &lt;script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/xlsx/0.13.5/xlsx.full.min.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/xlsx/0.13.5/jszip.js"&gt;&lt;/script&gt;
      &lt;!-- Latest compiled and minified CSS --&gt;
  &lt;link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css"&gt;
  
  &lt;!-- jQuery library --&gt;
  &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"&gt;&lt;/script&gt;
  
  &lt;!-- Latest compiled JavaScript --&gt;
  &lt;script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js"&gt;&lt;/script&gt;
      &lt;script src="hrm.js"&gt;&lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
     &lt;input type="file" id="fileUpload" /&gt;
  &lt;input type="button" id="upload" value="Upload" onclick="Upload()" /&gt;
  &lt;button  onclick="Alert()"&gt;click me&lt;/button&gt;
  
  &lt;div class="container"&gt;
      &lt;div class="row"&gt;
          &lt;div class="col-sm-4"&gt;
              &lt;div class="row"&gt;
                  &lt;div class="col-sm-2"&gt;
                      &lt;img src="https://www.hrmfitness.nl/wp-content/uploads/2019/09/Maandag_Tekengebied-1-min.png" alt="" class="img-icon-events"&gt;
                  &lt;/div&gt;
                  &lt;div class="col-sm-10" id="monday-aerobic"&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
              &lt;div class="row"&gt;
                      &lt;div class="col-sm-2"&gt;
                          &lt;img src="https://www.hrmfitness.nl/wp-content/uploads/2019/09/Dinsdag_Tekengebied-1-min.png" alt="" class="img-icon-events"&gt;
                      &lt;/div&gt;
                      &lt;div class="col-sm-10" id="tuesday-aerobic"&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
                  &lt;div class="row"&gt;
                      &lt;div class="col-sm-2"&gt;
                          &lt;img src="https://www.hrmfitness.nl/wp-content/uploads/2019/09/Woensdag_Tekengebied-1-min.png" alt="" class="img-icon-events"&gt;
                      &lt;/div&gt;
                      &lt;div class="col-sm-10" id="wednesday-aerobic"&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
                  &lt;div class="row"&gt;
                      &lt;div class="col-sm-2"&gt;
                          &lt;img src="https://www.hrmfitness.nl/wp-content/uploads/2019/09/donderdag_Tekengebied-1-min.png" alt="" class="img-icon-events"&gt;
                      &lt;/div&gt;
                      &lt;div class="col-sm-10" id="thursday-aerobic"&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
          &lt;/div&gt;
          &lt;div class="col-sm-4"&gt;
              &lt;div class="row"&gt;
                  &lt;div class="col-sm-2"&gt;
                      &lt;img src="https://www.hrmfitness.nl/wp-content/uploads/2019/09/Vrijdag_Tekengebied-1-min.png" alt="" class="img-icon-events"&gt;
                  &lt;/div&gt;
                  &lt;div class="col-sm-10" id="friday-aerobic"&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
              &lt;div class="row"&gt;
                  &lt;div class="col-sm-2"&gt;
                      &lt;img src="https://www.hrmfitness.nl/wp-content/uploads/2019/09/Zaterdag_Tekengebied-1-min.png" alt="" class="img-icon-events"&gt;
                  &lt;/div&gt;
                  &lt;div class="col-sm-10" id="saturday-aerobic"&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
              &lt;div class="row"&gt;
                  &lt;div class="col-sm-2"&gt;
                      &lt;img src="https://www.hrmfitness.nl/wp-content/uploads/2019/09/Zondag_Tekengebied-1-min.png" alt="" class="img-icon-events"&gt;
                  &lt;/div&gt;
                  &lt;div class="col-sm-10" id="sunday-aerobic"&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
          &lt;div class="col-sm-4"&gt;
                  &lt;div class="row"&gt;
                          &lt;div class="col-sm-2"&gt;
                              &lt;img src="https://www.hrmfitness.nl/wp-content/uploads/2019/09/Maandag_Tekengebied-1-min.png" alt="" class="img-icon-events"&gt;
                          &lt;/div&gt;
                          &lt;div class="col-sm-10"  id="monday-crossbox"&gt;
                          &lt;/div&gt;
                      &lt;/div&gt;
                      &lt;div class="row"&gt;
                              &lt;div class="col-sm-2"&gt;
                                  &lt;img src="https://www.hrmfitness.nl/wp-content/uploads/2019/09/Dinsdag_Tekengebied-1-min.png" alt="" class="img-icon-events"&gt;
                              &lt;/div&gt;
                              &lt;div class="col-sm-10"  id="tuesday-crossbox"&gt;
                              &lt;/div&gt;
                          &lt;/div&gt;
  
                          &lt;div class="row"&gt;
                              &lt;div class="col-sm-2"&gt;
                                  &lt;img src="https://www.hrmfitness.nl/wp-content/uploads/2019/09/Woensdag_Tekengebied-1-min.png" alt="" class="img-icon-events"&gt;
                              &lt;/div&gt;
                              &lt;div class="col-sm-10"  id="wednesday-crossbox"&gt;
                              &lt;/div&gt;
                          &lt;/div&gt;
  
                          &lt;div class="row"&gt;
                              &lt;div class="col-sm-2"&gt;
                                  &lt;img src="https://www.hrmfitness.nl/wp-content/uploads/2019/09/donderdag_Tekengebied-1-min.png" alt="" class="img-icon-events"&gt;
                              &lt;/div&gt;
                              &lt;div class="col-sm-10"  id="thursday-crossbox"&gt;
                              &lt;/div&gt;
                          &lt;/div&gt;
                          &lt;div class="row"&gt;
                              &lt;div class="col-sm-2"&gt;
                                  &lt;img src="https://www.hrmfitness.nl/wp-content/uploads/2019/09/Vrijdag_Tekengebied-1-min.png" alt="" class="img-icon-events"&gt;
                              &lt;/div&gt;
                              &lt;div class="col-sm-10"  id="friday-crossbox"&gt;
                              &lt;/div&gt;
                          &lt;/div&gt;
                          &lt;div class="row"&gt;
                              &lt;div class="col-sm-2"&gt;
                                  &lt;img src="https://www.hrmfitness.nl/wp-content/uploads/2019/09/Zaterdag_Tekengebied-1-min.png" alt="" class="img-icon-events"&gt;
                              &lt;/div&gt;
                              &lt;div class="col-sm-10"  id="saturday-crossbox"&gt;
                              &lt;/div&gt;
                          &lt;/div&gt;
                          &lt;div class="row"&gt;
                              &lt;div class="col-sm-2"&gt;
                                  &lt;img src="https://www.hrmfitness.nl/wp-content/uploads/2019/09/Zondag_Tekengebied-1-min.png" alt="" class="img-icon-events"&gt;
                              &lt;/div&gt;
                              &lt;div class="col-sm-10"  id="sunday-crossbox"&gt;
                              &lt;/div&gt;
                          &lt;/div&gt;
  
  
  
  
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  &lt;/body&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>I would like the Upload function to be started but now receive the error: </p>
  
  <pre><code>(index): 57 Uncaught ReferenceError: Upload is not defined
       at HTMLInputElement.onclick
  </code></pre>