I can't figure out how to use the name of a variable previously created with eval
, without knowing it.
I mean:
function getName(menu_name, level){
eval("var menu_"+level+"="+menu_name);
}
Now how do I get the name of the variable I just created? Probably keep using eval
, but I have to put that name into a $.post
call as one of my field name.
Thanks in advice.