title: Reload DOM after injecting form elements?
body: <p>I'm trying to put together some jQuery code that will add form elements (input checkboxes) to a form, once the user performs a certain action. Later on the user can then submit this form.</p>
  
  <p>I'm entirely new to jQuery, but I've managed to put together some code that almost works. Here's what I've got:</p>
  
  <pre><code>$("#someDivID").load("myPage.asp?id=x");
  </code></pre>
  
  <p>myPage.asp generates some form elements, and this all shows up nicely on the page.</p>
  
  <p>However, once I submit (through POST) the form, the new form elements are not actually posted. Here's the form submit function:</p>
  
  <pre><code>$(document).ready(function() {
  
      var options = {};
  
      // bind to the form's submit event
      $('#MyFormID').submit(function() {
        $(this).ajaxSubmit(options);
        return false;
      });
  });
  </code></pre>
  
  <p>You'll have to excuse me if I'm totally wrong on this, but I'm guessing it's because the new form elements are generated after the DOM is loaded initially. Do I have to reload the DOM (and if so how?), or should I be doing the whole thing differently?</p>
  
  <p>Best regards,
  Adam</p>