title: Why are all forms submitted when only one form's submit button is clicked?
body: <p>I have two forms that go to different places/serve different purposes, but co-exist in a popup window. Only one is intended to be used at a time. The first form's button submits only itself (correctly), but the second form's button submits both:</p>
  
  <p>form.html</p>
  
  <pre><code>&lt;div&gt;
      &lt;form id="form1" action="/onePlace" method="post"&gt;
        &lt;button type="submit"&gt;Submit&lt;/button&gt;
        &lt;!-- Submits form1 --&gt;
      &lt;/form&gt;
  
      &lt;form id="form2" action="/anotherPlace" method="post"&gt;
        &lt;button type="submit"&gt;Submit&lt;/button&gt;
        &lt;!-- Submits form1 and form2 --&gt;
      &lt;/form&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>loaded into another page</p>
  
  <pre><code>&lt;div id="loadedForm"&gt;&lt;/div&gt;
  &lt;script type="text/javascript"&gt;
  
      // Event fires to reveal in modular dialogue
      function(){
          $('#loadedForm').load('/form'); // Server serves form.html
          $("#promptLoginSignup").lightbox_me({
              centered: true,
              onLoad: function () {
                  $(function() {
                      $('#form1').submit(function(event) {
                          event.preventDefault();
                          console.log('form1 submitted'); // Fires on both button presses
                      });
                      $('#form2').submit(function(event) {
                          event.preventDefault();
                          console.log('form2 submitted'); // Fires only on second button press
                      });
                  });
              }
          });
      }
  &lt;/script&gt;
  </code></pre>
  
  <p>Why does this happen and how can I prevent it?</p>
  
  <p><strong>Edit</strong>: More accurately represents my actual code and describes the setup in more detail.</p>
  
  <p><strong>Edit 2 Clarification</strong>: This problem exists on a web server and uses resources from said server. It cannot be reproduced in a snippet or a pen. Simply pointing out the fact that it isn't reproducible on the page is not helpful, obviously this is not something that can actually be done on a single page and could not be held to the same scrutiny of "complete" code samples. I am giving you as much as possible and only asking for any insight that could be provided by those who may have some and not those without any.</p>