title: Form submit without refresh using jquery/ajax if page have more than one form
body: <p>Hi all I know that its very easy to submit a form without refreshing if there is only one form on the page but what about if there are more than one form on the page. Im using the following code for form submission and it works ok if there is only one form on the page. How can I change it to make it work when there are multiple forms on the page. Thanks in advance.</p>
  
  <pre><code>function processForm() { 
          $.ajax( {
              type: 'POST',
              url: form_process.php,
              data: 'user_name=' + encodeURIComponent(document.getElementById('user_name').value),
              success: function(data) {
                  $('#message').html(data);
              }
          } );
  }
  
  &lt;form action="" method="post" onsubmit="processForm();return false;"&gt;
  &lt;input type='text' name='user_name' id='user_name' value='' /&gt;
  &lt;input type='submit' name='submit' value='submit'/&gt;
  &lt;/form&gt;
  &lt;div id='message'&gt;&lt;/div&gt;
  </code></pre>