Hello! I've been using MooTools for some time but have never used it for sending ajax requests. I have a php form which, when called directly from the html page successfully sends an email, but i'd like to be able to do this without navigating away from the current page. I add the following event, which successfully stops the default send on click event, but doesn't seem to be communicating with the php script:
$('emlForm').addEvent('submit', function(event) { event.stop(); var req = new Request({ method: 'post', url: 'http://www.website.com/send.php', data: $('emlForm'), onRequest: function() { alert('Request made...'); }, onComplete: function(response) { alert('Result: ' + response); } }).send(); }); Any help would be greatly appreciated. Thanks :-)