I want to create the name of my function javascript when load in browser and run it.
I want the equivalence of this php's code :
<?php
$name_function = 'toto';
function toto() {
echo 'toto';
}
$name_function();
?>
My eval : the evil :)
var chaine = 'TabToto';
var store = chaine.substr(3,chaine.length);
eval ('store = this.get'+store+'Store()');
Ok , what i want :
var chaine = 'TabToto';
var store = 'get'+chaine.substr(3,chaine.length)+'Store';
store = this[store]();
My controller create a function to get a store and i want to use it ...