Aessandro
Aessandro

Reputation: 5761

Mootools AJAX post form

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

Answers (1)

Adidi
Adidi

Reputation: 5253

You can use Form.toQueryString or if you include "more" you can use Form Request

Upvotes: 4

Related Questions