Re: Retrieving data from multiple select list
| From: | Carsten Gehling | Date: | Sun, 11 Mar 2001 17:01:06 +0000 |
| Subject: | Re: Retrieving data from multiple select list | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-43394@lists.php.net to get a copy of this message | ||
From: "Ben Cheng" <ronin@darwinmail.net>
Sent: Sunday, March 11, 2001 3:27 PM
> Yeah I saw this in the online manual but is there any other way of
> doing this that doesn't require naming the select box in HTML with a
> [] at the end? Cause I have another button that calls a JavaScript
> to select all the options within CategoryID[] and it doesn't seem to
> work cause it's looking for a CategoryID[] array instead of a select
> box named CategoryID[].
You solve that one by referencing your selectbox in JavaScript like this:
document.myForm["CategoryID[]"].selectedIndex
instead of
document.myForm.CategoryID.selectedIndex
- Carsten