Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- how to get select text in a form?
December 14, 2005, 8:53 pm
rate this thread
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'
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?
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 <http://blog.dorward.me.uk/ <http://dorward.me.uk/
Home is where the ~/.bashrc is