title: HTML form returns NULL fields
body: <p>I have a basic form with several fields that i want to validate before submitting the code. However when i pass the form data to the js it says that the fields are null. Any help please? Im new at JS so please be patient with me. 
  The relevant form. Theres a button to toggle the forms display but i dont think that has any effect on this. </p>
  
  <pre><code>&lt;div id = "new_bk" style="display: none;"&gt;
      &lt;form id = "New_Book" onsubmit = "javscript: return(FormValidate());"&gt;
          Book Name:&lt;br&gt;
          &lt;input type="text" name="book_name"&gt;
  
          &lt;br&gt;
          Author name:&lt;br&gt;
          &lt;input type="text" name="author_name"&gt;
  
          &lt;br&gt;
          ISBN:&lt;br&gt;
          &lt;input type="text" name="ISBN"&gt;
  
          &lt;br&gt;
          Release Date:&lt;br&gt;
          &lt;input type="text" name="release_date"&gt;
  
          &lt;br&gt;
          Price:&lt;br&gt;
          &lt;input type="text" name="price"&gt;
  
          &lt;br&gt;
          Stock:&lt;br&gt;
          &lt;input type="text" name="stock"&gt;
  
          &lt;br&gt;
          Sold:&lt;br&gt;
          &lt;input type="text" name="sold"&gt;
  
          &lt;br&gt;
          Restock amount:&lt;br&gt;
          &lt;input type="text" name="restock"&gt;
  
          &lt;br&gt;
          Rating:&lt;br&gt;
          &lt;input type="text" name="rating"&gt;
  
          &lt;br&gt;
          Reviews:&lt;br&gt;
          &lt;input type="text" name="reviews"&gt;
  
          &lt;br&gt;
          &lt;input type="submit" value="Submit"&gt;
      &lt;/form&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>and the js </p>
  
  <pre><code>function FormValidate(){
      // if(document.getElementById("book_name").value.length&gt;0){
      //     alert("ok");
      // }else{
      //     alert("not ok");
      // }
      alert("Name is: "  + document.getElementById('book_name').value);
      if(document.New_Book.book_name.value == ""){
          alert("sdkg");
          return false;
      }
      return true;
  }
  </code></pre>
  
  <p>However this does not trigger the alert box. and if i switch it to </p>
  
  <pre><code>alert(document.getElementById('book_name'));
  </code></pre>
  
  <p>it gives me a null. </p>
  
  <p>Any and all help would be much appreciated. Oh and in case this matters. The js is in an external file that is referenced at the end of the body tag of the html file. </p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>the form sends the data correctly now. but now something odd happens. </p>
  
  <pre><code>alert("1");
  
  if(document.New_Book.book_name.value == ''){
      alert("Input book name please");
      return false;
  }
  
  alert("2");
  </code></pre>
  
  <p>this code segment will only trigger alert("1") then end. Neither the fail scenario alert nor alert("2") are triggered. any ideas why?</p>