Processing a SELECT form submission?

T

Tony

In this HTML:
<select>
<option value="1">Option1</option>
<option value="2">Option2</option>
<option value="3">Option3</option>
</select>

When the form is submitted, the selected VALUE (1,2, or 3) will be read by
the form handler.

But, how can my form handler read the NAME (Option1, Option2, or Option3) of
the selected value?

Thanks so much,

Tony
 
T

Thomas A. Rowe

It can't. You would have to do:

<select>
<option value="Option1">Option1</option>
<option value="Option2">Option2</option>
<option value="Option3">Option3</option>
</select>

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================
 
T

Tony

Yeah, that's what I figured - I'll put the value & name in the VALUE and
then parse it out.

Thanks, Tom

Tony
 
S

Stefan B Rusynko

IMHO
- a waste of time (in your example) since you already know the values 1, 2, 3 relate to Option1, Option2, Option3
- if you are going to parse it out (and not use it), why put it in




| Yeah, that's what I figured - I'll put the value & name in the VALUE and
| then parse it out.
|
| Thanks, Tom
|
| Tony
|
|
| | > It can't. You would have to do:
| >
| > <select>
| > <option value="Option1">Option1</option>
| > <option value="Option2">Option2</option>
| > <option value="Option3">Option3</option>
| > </select>
| >
| > --
| > ==============================================
| > Thomas A. Rowe (Microsoft MVP - FrontPage)
| > ==============================================
| > If you feel your current issue is a results of installing
| > a Service Pack or security update, please contact
| > Microsoft Product Support Services:
| > http://support.microsoft.com
| > If the problem can be shown to have been caused by a
| > security update, then there is usually no charge for the call.
| > ==============================================
| >
| | > > In this HTML:
| > > <select>
| > > <option value="1">Option1</option>
| > > <option value="2">Option2</option>
| > > <option value="3">Option3</option>
| > > </select>
| > >
| > > When the form is submitted, the selected VALUE (1,2, or 3) will be read
| by
| > > the form handler.
| > >
| > > But, how can my form handler read the NAME (Option1, Option2, or
| Option3) of
| > > the selected value?
| > >
| > > Thanks so much,
| > >
| > > Tony
| > >
| > >
| >
| >
|
|
 
T

Tony

The relationship between the VALUE, and Option name, may change - and after
being parsed, both are used by the target page.


IMHO
- a waste of time (in your example) since you already know the values 1,
2, 3 relate to Option1, Option2, Option3
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top