title: Post to SharePoint List HTML/js Web Form
body: <p>I am beating my head against a wall. I've looked at many examples and cannot get this to work.</p>
  
  <p>I am trying to use a simple HTML page with a javascript base (no C#/ASPX, not a Visual Studio solution or SharePoint Designer solution.) to add an item to a SharePoint list. My problem seems to be in getting the 'SP.Runtime.js' &amp; 'SP.js' files to load in my javascript . I say that because in the example I am using (<a href="https://stackoverflow.com/questions/32435432/sharepoint-2013-via-rest-api-error-403-forbidden-when-trying-to-create-item">Here</a>), when I get the line containing 'SP.Data.WorkflowTasksItem', the debugger throws an SP not defined error.</p>
  
  <p>My research says that I need to include SP javascript files from the SharePoint site. I added this code below to pull in the two js files from the Sharepoint server, but it begins to execute the first getScript and then stops without any error message or anything logged into the console.</p>
  
  <p>Here is my javascript:
  </p>
  
  <pre><code>//  js/index.js
  $(document).ready(function() {
      $('#request_form').bootstrapValidator({
          submitHandler: function(validator, form, submitButton) {
              //Call CreateListItem function once sp.js is loaded
              ExecuteOrDelayUntilScriptLoaded(createListItem, "sp.js");
          }
      }
  }
  </code></pre>
  
  <p>Here is my html head</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;head&gt;
      &lt;meta charset="UTF-8"&gt;
      &lt;title&gt;Title&lt;/title&gt;
  
      &lt;link rel='stylesheet prefetch' href='https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css'&gt;
      &lt;link rel='stylesheet prefetch' href='https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap-theme.min.css'&gt;
      &lt;link rel='stylesheet prefetch' href='https://cdnjs.cloudflare.com/ajax/libs/jquery.bootstrapvalidator/0.5.0/css/bootstrapValidator.min.css'&gt;
      &lt;link rel="stylesheet" href="css/style.css"&gt;
  
      &lt;script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'&gt;&lt;/script&gt;
      &lt;script src='https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js'&gt;&lt;/script&gt;
      &lt;script src='https://cdnjs.cloudflare.com/ajax/libs/bootstrap-validator/0.4.5/js/bootstrapvalidator.min.js'&gt;&lt;/script&gt;
      &lt;script type='text/javascript' src='/_layouts/15/sp.runtime.js'&gt;&lt;/script&gt;
      &lt;script type='text/javascript' src='/_layouts/15/sp.js'&gt;&lt;/script&gt;
      &lt;script src='js/index.js'&gt;&lt;/script&gt;
  &lt;/head&gt;
  </code></pre>
  
  <p>With the new code, I am getting a reference error:</p>
  
  <blockquote>
    <p>Uncaught ReferenceError: ExecuteOrDelayUntilScriptLoaded is not defined</p>
  </blockquote>