Reputation: 5761
I am using mootools for the first time to do an AJAX call with method "post". I would like to capture the data from the form. first name, email and checkbox)
Is there something similar to the jQuery form.serialize()?
$('submit').addEvent('click', function(event) {
var req = new Request({
method: 'post',
url: 'url.php',
data: ,
onSuccess: function(response) {
alert(response);
});
});
Upvotes: 2
Views: 1953
Reputation: 5253
You can use Form.toQueryString or if you include "more" you can use Form Request
Upvotes: 4