how to get select text in a form?

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Hi Guys,

I built a select in a form. My select is:
            print '<SELECT NAME="county">'
            print '<OPTION VALUE="000">ALL'
            print '<OPTION VALUE="001">AAA'
            print '<OPTION VALUE="002">BBB'
            print '</SELECT>'

I can get which item value users select. For example users select item
2, I can get its value "001". But now I want to get item text "AAA",
not its value "001". How I can do this. I use CGI, HTML and python to

Any help is appricated.


Re: how to get select text in a form? wrote:
Quoted text here. Click to load it

You can't get it from the data submitted. If you generate your form
programatically, you can use the same data source as you used to generate
your form to work out what value corresponds to what text. (Or you could
just not set a value and use the text itself as the form data).

David Dorward       < <
                     Home is where the ~/.bashrc is

Site Timeline