title: AJAX PHP - Reload div after submit
body: <p>I'm trying to reload a select with jquery and ajax, this select must be reload after I submit a new entry, right now I reach this point.</p>
  
  <pre><code>$("form").on("submit", function (e) {
      e.preventDefault();
      var form_id = $(this).attr('id');
      var form_details = $('#' + form_id);
      $.ajax({
          type: "POST",
          url: 'Users.php',
          data: form_details.serialize(),
          success: function (data) {
              $('#check_data').html(data);
              $('#div_to_update').load('my_page.php #div_to_update');
          }
      }
  });
  </code></pre>
  
  <p>The div to be reloaded has a html select generate by a php code, the other fields are just plain html:</p>
  
  <p>This is the first form, that must be reloaded with the values I enter in the form2:</p>
  
  <pre><code>&lt;div id="div_to_update"&gt;
      &lt;form id="form1"&gt;
          &lt;?php Helper::combo_users(); ?&gt;
          /*
          ...
         */
      &lt;/form&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>This is the form 2:</p>
  
  <pre><code>&lt;form id="form2" method="post"&gt;
      &lt;input type="text" id="user_reg" name="user_reg"/&gt;
      &lt;input type="text" id="user_name" name="user_name"/&gt;
      &lt;input type="submit" value="Add"/&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>The odd thing is, this code will run the first time ok(I enter the values in the form2 and send, the form1 will reload with the new value), but the second time it does not work(when I click submit on the form2 nothing seems to happen) and the third time it will work again (click the submit button again and the value is send and the form 1 is reloaded) and so on. </p>