[thelist] Using variables in DOM object names

VOLKAN ÖZÇELİK volkan.ozcelik at gmail.com
Tue Jul 12 21:13:47 CDT 2005


> Because there are many form fields to set, I would like to place them in
> an array and loop over the array, but I don't know how to properly refer
> to the objects when they have a variable within their name.  Here is my
> NON-working code:
> 

How about using globally used document.getElementById (which is also
the standard way of doing it) ?

imho, you are over-complicating the problem.
Besides imho, your code should work. if I don't miss something.
Can you give an URL to check?

HTH,
Volkan.


More information about the thelist mailing list