function ajax() {
$('form').submit(function() {
console.log($(this).serializeArray());
$('#result').text(JSON.stringify($(this).serializeArray()));
return false;
});
}
This is the json data i'm getting:
[{"name":"firstName","value":"erere"},{"name":"lastName","value":"rere"},{"name":"emailAddress","value":"[email protected]"},{"name":"password","value":"dfdfd"},{"name":"phoneNumber","value":"989989898"}]
How can I send it to the server. What should I include in data in the ajax call?
.submit()is notajax()call BTW