title: autosave two forms on the same page
body: <p>I have a page that uses jQuery to autosave a form (to mysql db) using the code below:</p>
  <pre><code>&lt;script type='text/javascript'&gt;
  $(function() {
  
      getDatabase();
      
      $('input,select,textarea').autosave({
          url: 'update_name_etc_autosave.php',
          method: 'post',
          grouped: true,
          success: function(data) {
              $('#message p').html('Data updated successfully').show();
              setTimeout('fadeMessage()',1500);
              getDatabase();
          },
          send: function(){
              $('#message p').html('Sending data....');
          },
          dataType: 'html'
      });     
      
      
  });
  
  function getDatabase(){
      $.get('autosave_name_etc.php', function(data) {
        $('#database').html(data);
      }); 
  }
  
  function fadeMessage(){
      $('#message p').fadeOut('slow');
  }
  &lt;/script&gt;
  </code></pre>
  <p>This works fine when there is only one record. However in about half the records have two records. This then loops through and creates two forms on the same page. When this happens the autosave only works for the second form</p>
  <p>How do I create two instances of the script or what do I need to rename dynamically in the script that will enable the autosave to work on both forms?</p>
  <p>I am very much not an expert with jQuery or Javascript so if you could spell it out in layman's terminology would be much appreciated.</p>