[Javascript] dynamic var names

Michael Borchers list at tridemail.de
Tue Aug 7 04:12:34 CDT 2007


I dynamically create a name for a var, let's say

var myDynVar    = 'foo';

Now I want to fill (var) foo with a value f.e. 'bar', so the next time I

alert(foo)    results in => bar;

I tried several combinations with eval() but still didn't get it. Can anyone help?




MfG
Michael Borchers
Tridem GmbH
http://www.tridem.de
mailto: borchers at tridem.de
Tel.: 0491 / 96 06 71 63
ICQ: 322766923
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20070807/64b50ae5/attachment.htm>


More information about the Javascript mailing list