RE: [PHP] array[] and Javascript.
| From: | Martin Towell | Date: | Fri, 25 Jan 2002 04:19:37 +0000 |
| Subject: | RE: [PHP] array[] and Javascript. | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-82057@lists.php.net to get a copy of this message | ||
syntax: document.forms["form_name"].elements["element_name"]
so: document.forms["fname"].elements["array[]"].somethingelse
-----Original Message-----
From: Rodolfo Gonzalez [mailto:rodolfo@equinoxe.g-networks.net]
Sent: Friday, January 25, 2002 1:55 PM
To: php-general@lists.php.net
Subject: [PHP] array[] and Javascript.
Hi list,
I have a little problem here. I need data from a HTML multiple select box
passed to PHP. Ok, that's really easy, just put name="array[]" like this:
<select name="array[]">
<option value="1">Alabama</option>
...
</select>
But then, I *need* to access that select and its elements and properties
with Javascript (something like document.forma.array[].somethingelse), but
the [] brackets are not accepted (syntax error). Is there any other way to
access the data from a multiple select box in PHP without using the [] in
the name in HTML?. Or, on the other hand, is there any way to make the
array[] work in Javascript?.
Any help is *really* appreciated.
Thanks a lot.
Rodolfo.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net