Now I use this method to call functions inside a Namespaces:
eval('Admin.' + section + '.' + action + '()');
But I don't like use eval
, I need to call methods in different namespaces creating the call using string given me from JSON, but I think this is not good system, because eval
it's dangerous.
Any other form to make this works? Thanks!