Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Select options in order

Reply
Thread Tools

Select options in order

 
 
Leonardo Calado
Guest
Posts: n/a
 
      08-31-2006
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?

 
Reply With Quote
 
 
 
 
RobG
Guest
Posts: n/a
 
      09-01-2006
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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
gcc compiler options for K&R C code Options Utkado C Programming 2 12-18-2008 01:50 PM
Performance issue in multi-level Oracle Object/thin JDBC Options Options jacksu Java 0 10-09-2007 08:21 PM
good compile options for g++ options to enforce good coding Cliff Martin C++ 1 01-31-2007 02:03 AM
select of select box will select multiple in another box palmiere Javascript 1 02-09-2004 01:11 PM
Letting user select from multiple options in a specific order? Leif K-Brooks HTML 5 11-19-2003 08:25 PM



Advertisments