1.7 AJAX Changes

43 views
Skip to first unread message

fyrye

unread,
Jun 4, 2010, 8:20:15 PM6/4/10
to MooFloor
Hey all,

We've made some enhancements to the current submitByAjax feature of
FormCheck.
Since there are several different MooTools methods for AJAX, we've
decided to include all of them.
Yep all of them.

So first of lets cover what's been changed.
submitByAjax has been changed to ajaxSubmit
and all ajaxResponseDiv, ajaxEvalScripts, and onAjax******** events
have been removed.

I know you're saying, "but what if we were doing something that
required onAjaxComplete?" or similar
A new option has been added:
ajaxOptions: {
onComplete: function(){
}
}
Which will also allow you to use any of the MooTools Request options.


So how do you use Request.****?:
If you want to use Request.JSON as your submitByAjax method, when
initializing FormCheck you can do it like so:
var fc= new FormCheck({
ajaxSubmit: 'JSON'
});
Additionally, ajaxOptions will inherit the Request.JSON options as
well.

For those of you who use the ajaxResponseDiv and ajaxEvalScripts the
alternatives will now be
var fc= new FormCheck({
ajaxSubmit: 'HTML',
ajaxOptions: {
evalScripts: true,
update: $('myElementID')
}
});


If you have any questions or comments please feel free to post here.
Reply all
Reply to author
Forward
0 new messages