title: jQuery post not triggering PHP script
body: <p>I am trying to trigger a PHP script using <code>post</code> when a user clicks a button, but nothing happens. I tested to check if the correct button is clicked using <code>alert</code> and it is clicked, but after that nothing happens. This is the code:</p>
  <p>html file:</p>
  <pre><code>&lt;body&gt;
  &lt;input type=&quot;submit&quot; class=&quot;button&quot; id=&quot;' . $row['id'] . '&quot; value=&quot;submit&quot;&gt;
         
  &lt;script src=&quot;/js/jquery-3.5.1.slim.min.js&quot;&gt;&lt;/script&gt;
  &lt;script src=&quot;/js/update.js&quot;&gt;&lt;/script&gt;
  &lt;/body&gt;
  </code></pre>
  <p><code>update.js</code> file:</p>
  <pre><code>$(document).ready(function () {
      $(document).on(&quot;click&quot;, &quot;.button&quot;, function (e) {
          e.preventDefault();
          e.stopPropagation();
  
          var id = $(this).attr('id');
          alert(id); // the correct id shows up
  
          $.post(&quot;/test_folder/test_post.php&quot;) // send to simple php test script
                  .done(function () {
                      alert(&quot;done&quot;);
          });
  </code></pre>
  <p><code>test_post.php</code> file:</p>
  <pre><code>&lt;?php
  echo &quot;Test&quot;;
  exit;
  </code></pre>