You might want to start by taking a look at the JQuery
$.post API Documentation[
^]
That said, your code shou;d be
$.post ( 'action.php', { "formData": formData } , function(data) {
alert(data);
});
The function should then show the serialized data from the server where you wrote
print_r($_POST);
Note that since you are sending this via AJAX, your page will not reload.
EDIT:
just before the
alert
you could do...
var p = document.createElement("input");
$(form).append(p);
p.name = "formData";
p.type = "hidden"
p.value = formData;
That will add a hidden input to your form containing the serialized values that can be sent to your server. Tty changing
p.type
to
text
to debug.