title: onclick submit Button: Uncaught TypeError: Cannot read property 'value' of null
body: <pre><code>Uncaught TypeError: Cannot read property 'value' of null
      at register (VM43 js.js:66)
      at HTMLInputElement.onclick ((index):18)
  </code></pre>
  
  <p>Name should be null but it isnt. Somebody any ideas how i could fix this? Im new to html/js</p>
  
  <pre><code>&lt;form&gt;
    &lt;input name="Name" type ="text" value="Name"&gt;
    &lt;input name="Description" type="text" value="Description"&gt;
      &lt;select name="Art" size="3"&gt;
        &lt;option value="photo"&gt;Photo&lt;/option&gt;
        &lt;option value="video"&gt;Video&lt;/option&gt;
      &lt;input type="datetime-local" name="DateTime"&gt;
      &lt;input type="submit" value="Upload" name="Upload" onclick="register();"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>JS:</p>
  
  <pre><code>function register(){
    var name = document.getElementById('Name').value;//document.getElementsByTagName("firstname")[0].firstChild.data;
    var desc = document.getElementById('Description').value;
    var date = document.getElementById('DateTime').value;
    request.open("post", "db.php", false);
    request.onreadystatechange = scoreBoard;
    request.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
    //request.send("INSERT INTO Accounts VALUES('3', 'fl', 'pass')");
    console.log("f:"+f+" l:"+l+" e:"+e+" p:"+p);
    request.send("INSERT INTO `Uplouds`(name, descr, date) VALUES('"+name+"', '"+desc+"', '"+date+"')");
  }
  </code></pre>
  
  <p>Thanks a lot
  Felix</p>