The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

how to pass name parameters to function(id)

i have a select box with a name but no id, and i want to call the function document.all() which takes an id as a parameter, how can i make it to take the name instead of the id.
The reason my select does not take an id is because it is dynamically generated using Java.

Do NOT use document.all. Instead of that document.getElementById() should be used. But, since you want to use the name, that doesn't seem optimal either - I think what you want is document.getElementsByName(). That will return a NodeList of all the elements that have the specified name. If there is only one element with the name, it'll be the first and only item in the list: