title: AJAX Post Implementation in Pure Javascript
body: <p>is there any implementation of AJAX Post in Pure Javascript (maybe using xmlhttprequest)?</p>
  
  <p>For example if I have a form like this:</p>
  
  <pre><code>&lt;form action="request.php" id="register_form"&gt;
    &lt;input type="text" name="first_name" placeholder="First Name"&gt;
    &lt;input type="text" name="last_name" placeholder="LastName"&gt;
    &lt;input type="submit" value="submit_now"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>and this is my implementation of the AJAX in jQuery</p>
  
  <pre><code>$('#register_form').submit(function(e) {
  
  var postData = $(this).serializeArray();
  var formURL = $(this).attr("action");
  
  /* start ajax submission process */
  $.ajax({
      url: formURL,
      type: "POST",
      data: postData,
      success: function(data, textStatus, jqXHR) {
          alert('Success!');
      },
      error: function(jqXHR, textStatus, errorThrown) {
          alert('Error occurred!');
      }
  
  });
  
  e.preventDefault(); //STOP default action
  
  /* ends ajax submission process */
  
  });
  </code></pre>
  
  <p>Can I do the same <strong>WITHOUT</strong> the use of jQuery? If it is possible, <strong>how</strong> can I implement the above jQuery code into pure/plain Javascript code? </p>