xxxxxxxxxx
$("#idForm").submit(function(e) {
e.preventDefault(); // don't execute the actual submit of the form.
var form = $(this);
var actionUrl = form.attr('action');
$.ajax({
type: "POST",
url: actionUrl,
data: form.serialize(), // serializes the form's elements.
success: function(data)
{
alert(data);
}
});
});