OZONE Asylum
Forums
DHTML/Javascript
Javascript - string as variable name?
This page's ID:
32042
Search
QuickChanges
Forums
FAQ
Archives
Register
Edit Post
Who can edit a post?
The poster and administrators may edit a post. The poster can only edit it for a short while after the initial post.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
Hey guys. Having a little trouble finding the answer to this one... I have a series of form elements with id's, which, when clicked, I want to trigger another event... I have a set of variables, each container an array of data. The variable names are the same as the id's of the form elements. I want to pass the id of the clicked element, as the variable name of the data array that I need to send.... in PHP I would do this like ${'string'} to access the variable $string I've found pages telling to do something like window['string']...but that doesn't seem to do....well, anything in my case. I am getting the correct string from the element id.... (let's say... 'foo'...) how do I tell my script I want it to use the contents of the variable foo? [url=http://in-dented.net/sigs/][img]http://in-dented.net/sigs/rotate.php[/img][/url]
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »