syntax for form with name id[1] in it

Hi all,

I'm trying to use this:

document.form1.id[1].value=x

to set the value of a select control on a form that is named id[1]. It doesn't work and complains that form1.id.1 does not exist. If I ditch the [] brackets than it works but I can't rename the control because it is part of OSCommerce.

How do I encapsulate the id[1] so that it is treated literal.

The on_click event is being triggered from outside the form so I can't use this keyword.

I suck...so help me!

TIA,

[527 byte] By [peapodnewbiea] at [2007-11-26 22:52:41]
# 1
That looks like Javascript to me. Javascript is not Java, which is what this forum is about.
DrClapa at 2007-7-10 12:15:29 > top of Java-index,Java Essentials,New To Java...
# 2
Sorry about that - you are right, I am trying to find syntax help with Javascript.Thanks for responding though. Please disregard my post as I found the solution early this AM.
peapodnewbiea at 2007-7-10 12:15:29 > top of Java-index,Java Essentials,New To Java...