window.addEvent('domready', function() {
$('myForm').addEvent('submit',function(event) {
event.preventDefault();
this.send();
})
});
This does not work
window.addEvent('domready', function() {
$('myForm').addEvent('submit',function(event) {
event.preventDefault();
this.send({onComplete:function(){alert('this');}});
})
});
This works with callbacks
window.addEvent('domready', function() {
$('myForm').addEvent('submit',function(event) {
event.preventDefault();
this.set('send',{onComplete:function(){
alert('this');
}
}).send();
})
});
Anyways, after a day of playing with MooTools, I have say I am impressed. Not sure why, but I think this is my favorite framework. I can't say I have much experience with JS frameworks, and my JavaScript is pretty bad these days, but I am impressed with MooTools so far.