[thelist] Multiple drop down lists

Chris at globet.com Chris at globet.com
Thu Sep 22 11:26:40 CDT 2005


Brian

> I have a situation where you could select many different 
> choices from the same drop down list.
> 
> I want to offer the drop down list the first time and then 
> prompt the user if they need to select another and if they 
> choose yes magically show another drop down list and so on.
> 
> I use asp/javascript.

I believe someone has already commented that in these circumstances an
array of HTML checkbox controls may be more appropriate. Failing this,
an HTML multiple select control could be used, allowing the user to
select as many items as they wish from a single list. The latter would
require some user instruction, as these kinds of HTML select controls
are less common. The benefit of these solutions in terms of good UI
design is (IMO) that all selections can be accomplished in a single
step. This makes the process more accurate and more efficient for the
user.

If multiple HTML select controls *must* be used, then you will need to
design a system that will accommodate them. You must know what is
happening to the data on the server so that you can provide the data to
this process in an acceptable format. It may be a good idea to stay away
from client side javascript no matter how tempting it may be, as
committment to this path could leave your entire system unavailable to
users without javascript.

You will probably need to consider how to maintain state between
pages/scripts that are requested from the browser. If you successfully
maintain state, then you can just keep adding each new selection to an
array (or other data structure) on the server. When the selections have
been completed, the next stage of the process can be moved on to, with a
full set of data from the user. This adds further levels of complexity,
as you must handle duplicates - do you allow them or not? If you allow
duplicates then you will probably require a system to increment the
number of each selection if the selection has already been made, and add
the item if it has not already been selected. If you do not allow
duplicates, then do you remove them from the available items in each
successive HTML select control, or do you display all of the items in
every HTML select control but stop a duplicate being added on the
server? In this case, do you display an error message to the user?

HTH

Chris Marsh
Web Developer
http://www.globet.com/
Tel: +44 20 8246 4804 Ext 828
Fax: +44 20 8246 4808

Any opinions expressed in this email are those of the individual and not
necessarily the Company. This message is intended for the use of the
individual or entity to which it is addressed and may contain
information that is confidential and privileged and exempt from
disclosure under applicable law. If the reader of this message is not
the intended recipient, you are hereby notified that any dissemination,
distribution, or copying of this communication is strictly prohibited.
If you have received this communication in error, please contact the
sender immediately and delete it from your system. 


More information about the thelist mailing list