Is there a way I can get all the values listed in the list box, whether or not they are selected?
Probably not. When a HTML form is submitted, it usually does not carry this additional information, but only the selected values in the various form widgets/components.
Generally, to get all those list values, you will have to read the HTML of the form and parse it to find the list box if the page is static. Because if the page is dynamically filled via JavaScript, you will have to mimick the browser's behavior to get the list.
But if you're designing the page, like jettero said, you may arrange things to get the value list sent with the submitted data form and then do what you want with this information. That can be done for example with a little bit of Javascript and some hidden form component.
In reply to Re: Getting all values from a CGI list box
by ferreira
in thread Getting all values from a CGI list box
by rashley
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |