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
You could refer to Function.apply. Assuming the callback functions are declared in global object (window
in browser).
var callback_function = window[function_name];
if (callback_function) { // prevent from calling undefined functions
callback_function.apply(window, params); // params is an array holding all parameters
}