Re: Hierselect unique id for each select

From: Date: Thu, 01 Jun 2006 14:41:04 +0000
Subject: Re: Hierselect unique id for each select
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-24222@lists.php.net to get a copy of this message
On 5/31/06, Tony Marion <sub@marionweb.com> wrote:
I have tried countless ways to get the value of my selects from within a javascript function. The problem seems to be with the [0] and [1] brackets after the name of the element. If I use the keyword (this) I am able to pass the element information, but it doesn't help when I am invoking JS on form load and not from onclick. I think the best solution would be to have a unique id for each element, but it doesn't look like this is possible. The other would be to get the correct syntax for retrieving the value of an element that has the square brackets as part of the name. Has anyone else run into these problems? If so please assist.
Use the elements array. form.elements["select[0]"] -- Justin Patrin

« previous php.pear.general (#24222) next »