Form submit without refresh using jquery/ajax if page have more than one form
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. function processForm() { $.ajax( { type: 'POST', url: form_process.php, data: 'user_name=' + encodeURIComponent(document.getElementById('user_name').value), success: function(data) { $('#message').html(data); } } ); } <form action="