How can I reference a form by name using JQuery?
I have 3 different forms with the same name, author-form. I have used this function but it only works with the ID field of the form. Why should I create 3 separate functions when I can create one, using the same form name for all three forms?
$('#author-form').submit(function() {
var action = $("author-form").attr('action');
var form_data = $(this).serialize();
$.ajax({
type: "POST",
url: "http://localhost/zabjournal/pages/author/progress.php",
data: form_data,
success: function(response) {
}
});
return false;
});
Should work