var aoArticleGroups = { handleSuccess:function(o) { this.processResult(o); }, handleFailure:function(o) { }, processResult:function(o) { groups = o.responseText.parseJSON(); treeInit( groups ); }, startRequest:function() { YAHOO.util.Connect.asyncRequest( 'POST', '/ajax/ajax.php', aoArticleGroupsCallback, "action=getArticleGroupsTree" ); } }; /* * Define the callback object for success and failure * handlers as well as object scope. */ var aoArticleGroupsCallback = { success:aoArticleGroups.handleSuccess, failure:aoArticleGroups.handleFailure, scope: aoArticleGroups };