My JavaScript code is barely an Ajax request that expects XML to be returned from back-end. The back-end can return execute_callback as one of XML tags like thi
Instead of calling the function, reference your function as an element in an associative array by name:
var funcName = // parse your xml for function name
var params = new Array();
params[0] = 10.2; // from your parsed xml
params[1] = 'some text'; // also from your parsed xml
// functions are attached to some Object o:
o[funcName](params); // equivalent to o.funcName(params);
I wrote an example of the above here: http://jsbin.com/ewuqur/2/edit