User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 423,874 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,115 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting

Using "variable variables" in Javascript

Join Date: Dec 2004
Location: Lincoln Park, Michigan
Posts: 1,744
Reputation: Comatose is an unknown quantity at this point 
Rep Power: 7
Solved Threads: 108
Colleague
Comatose's Avatar
Comatose Comatose is offline Offline
Moderator

Re: Using "variable variables" in Javascript

  #2  
May 10th, 2005
To my knowledge... NO. You could do it with Multidimensional array, but trying to do it the way above would never work (not in javascript, anyway). An option to consider, is to create your own object, with a bunch of properties, and then create an array of those objects (I think you can do that in Javascript). Then you can loop through just 1 array, and access any number of properties of the object. So, you make the object to have, say, a "tag" property. Then you create an array of that object, loop through the array, and access the .tag property. I hope I haven't confused more than I Have helped. If so, let me know, and I'll post an example when I get home.
Reply With Quote  
All times are GMT -4. The time now is 4:31 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC