title: Submit HTML Form - Prevent Redirect and capture JSON response
body: <p>I am successfully submitting an HTML form to my backend, however I want to prevent the redirection and read the JSON message returned by the backend.
  So far I only have the usual HTML form with a submit button.</p>
  
  <p>UPDATE (To fix CORS Error):
  Added the following three lines before <code>RewriteEngine On</code> in the .htaccess file of my backend:</p>
  
  <pre><code>Header add Access-Control-Allow-Origin "*"
  Header add Access-Control-Allow-Headers "origin, x-requested-with, content-type"
  Header add Access-Control-Allow-Methods "PUT, GET, POST, DELETE, OPTIONS"
  </code></pre>