title: two forms and two scripts on same page, the first script is invoked regardless of submit
body: <p>I have a page with two forms, one for submitting some data and return data from DB and the other one which makes an autocomplete search on DB and then should return data from the DB.
  The two forms work as expected while in different pages, now I tried to put them in one page but if I perform the autocomplete / fulltext search on the second form I get results from the first form.
  I think the problem is the javascript is catching the data in the first form regardless of what submit button is pressed, the two forms have different action routes.
  This is the first script:</p>
  
  <pre><code> jQuery(function ($) {
      $(document).ready(function () {
          var form = $('form');
          form.submit(function (e) {
              e.preventDefault();
              $.ajax({
                  url: form.prop('action'),
                  type: 'post',
                  dataType: 'json',
                  data: form.serialize(),
                  success: function (data) {
                      var obj = (data);                                        
                      var resultStr = "";
  
                      //something
  
                      $("#results").html(resultStr);
  
                  }
              });
  
          });
      });
  });
  </code></pre>
  
  <p>second one</p>
  
  <pre><code>$(document).ready(function () {
      $('input:text').bind({});
      $('input:hidden').bind({});
      $("#models").autocomplete({
          minLength: 1,
          source: URL
  
      });
  });
  </code></pre>
  
  <p>so, why is the page returning resultStr and filling the div instead of the data I ask after fulltextsearch using second script? Any idea?</p>