Feb 21, 2001 #1 Rois Programmer Joined Feb 21, 2001 Messages 2 Location IL I want to declare a new Variable which its name is the Value of anothere variable for example if var b = "fff" then i waant to make a new Variable named fff. thanks Roi
I want to declare a new Variable which its name is the Value of anothere variable for example if var b = "fff" then i waant to make a new Variable named fff. thanks Roi
Feb 21, 2001 #2 luciddream Programmer Joined Nov 8, 2000 Messages 712 Location US you could use eval... i dont suggest doing this, but, you could. var b = 'fff'; eval("var "+b+" = 'blah'" adam@aauser.com Upvote 0 Downvote
you could use eval... i dont suggest doing this, but, you could. var b = 'fff'; eval("var "+b+" = 'blah'" adam@aauser.com
Feb 22, 2001 #3 jaredn Programmer Joined Sep 1, 1999 Messages 1,506 Location US or this: d="fff" window[d]="blah" jared@aauser.com - http://webfx.eae.net Upvote 0 Downvote