function get_root_nodes var callback success function YAHOO lang JSON

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
function get_root_nodes()
{
var callback =
{
success: function(o)
{
r = YAHOO.lang.JSON.parse(o.responseText);
}
}
var postData = {id: 'jsonrpc', method: 'bbb', params: []};
var postData = YAHOO.lang.JSON.stringify(postData);
var request = YAHOO.util.Connect.asyncRequest('POST', './../json/', callback, postData);
return r;
}
q = get_root_nodes();