This module allows developers to make some POST and GET ajax request that returns JSON result or void, more easily. It's similar to the method post() and get() from jQuery.
The module contains 2 methods post() and get().
This module allows developers to make some POST and GET ajax request that returns JSON result or void, more easily. It's similar to the method post() and get() from jQuery.
The module contains 2 methods post() and get().
YUI().use('gallery-simple-ajax', function(Y) {
//Make a POST request
Y.SimpleAjax.post('ajax.php?id=1',function(data){
if(data.json){
Y.log(data.json);
}
},myContext, {action: 'getNames',page:2})
//Make a GET request
Y.SimpleAjax.get('ajax.php?id=1',function(data){
if(data.json){
Y.log(data.json);
}
})
});No forum posts for this module.
© 2010 YUI Library - Site Credits