By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,712 Members | 2,111 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,712 IT Pros & Developers. It's quick & easy.

Select options in order

P: n/a
Hi, I have the following problem:

I have 4 select fields like;

<select id="choice_101" name="choice_101">
<option label="Will not attend" value="Will not attend"
selected="selected">Will not attend</option>
<option label="First Choice" value="First Choice">First
Choice</option>
<option label="Second Choice" value="Second Choice">Second
Choice</option>
<option label="Third Choice" value="Third Choice">Third
Choice</option>
<option label="Fourth Choice" value="Fourth Choice">Fourth
Choice</option>
</select>

choice_102, choice_103 and choice_104

The user must bem select options in this 4 files in order, for example,
he must bem select first "First Choice" next "Second Choice"... The
options not be same.

Somebody help me?

Aug 31 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Leonardo Calado wrote:
Hi, I have the following problem:

I have 4 select fields like;
Select elements :-)

<select id="choice_101" name="choice_101">
<option label="Will not attend" value="Will not attend"
selected="selected">Will not attend</option>
The purpose of the label attribute is to supply different display text
(usually shorter) than the option element's content. There doesn't
seem much point in using it if they are the same, it just adds page
bloat.

<option label="First Choice" value="First Choice">First
Choice</option>
<option label="Second Choice" value="Second Choice">Second
Choice</option>
<option label="Third Choice" value="Third Choice">Third
Choice</option>
<option label="Fourth Choice" value="Fourth Choice">Fourth
Choice</option>
</select>

choice_102, choice_103 and choice_104

The user must bem select options in this 4 files in order, for example,
he must bem select first "First Choice" next "Second Choice"... The
options not be same.
Why do you care what order they are selected in? All you really want
is to know that the user has made some choices, who cares if they
select their fourth preference before their first?

If you want to proceed, use a single select with the available choices.
Let the user select one as their first choice, then have an "add
choice" button to put the value into a hidden field and remove the
choice from the list of available choices, or give them an error
message if they've already used that choice.

Reflect the selected values and their order in the page somewhere. You
might also want to let users modify their choice order.
--
Rob

Sep 1 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.