|
Posted by mcha226@gmail.com on August 22, 2007, 12:59 am
Please log in for more thread options
Hi All
I have to build a page which includes a select element (as a drop down
menu) with all the country names in it. However I just found out that
the need to be repeated many times so the client can select as many
country as they can in their around the world trip planning.
I don't want to repeat this long list multiple times, because I want
to save bandwidth. Is there a more efficient way to do this rather
than using JavaScript to repeat the code on the client side? (which I
don't know how to do yet).
Thanks
|
|
Posted by Jukka K. Korpela on August 22, 2007, 1:51 am
Please log in for more thread options
Scripsit mcha226@gmail.com:
> I have to build a page which includes a select element (as a drop down
> menu) with all the country names in it.
Tell the people who told you to do that what the drawbacks are. You should
be able to list down half a dozen good reasons easily.
> However I just found out that
> the need to be repeated many times so the client can select as many
> country as they can in their around the world trip planning.
Technically, it need not be repeated, since you can use the MULTIPLE
attribute in the select element. However, people will generally not know
that they can select multiple elements and how to do that, and even if they
do, its is a nightmare to actually make such selections.
Using a set of checkboxes (associated with country names) would produce
_much_ better usability. Users would have to scroll the _page_ then, but is
this any worse than having to scroll the drop down _menu_? No, it's actually
much better, more useable.
Perhaps even better, you could include a text input field (input type="text"
or textarea) where people can type in the names of the countries. You would
then need to parse - in the server-side form handler - the names, maybe even
with synonym recognition and loose matching (taking, say, "finland",
"finnland", and "finlandia" all matching "Finland"). More work to you, maybe
better usability to users.
--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/
|
|
Posted by Robert Latest on August 22, 2007, 5:45 am
Please log in for more thread options
Jukka K. Korpela wrote:
> Scripsit mcha226@gmail.com:
>
>> I have to build a page which includes a select element (as a drop down
>> menu) with all the country names in it.
>
> Tell the people who told you to do that what the drawbacks are. You should
> be able to list down half a dozen good reasons easily.
[...]
> Using a set of checkboxes (associated with country names) would produce
> _much_ better usability.
My sentiments exactly: Dropdown menus are almost always bad. To select one
or more items out of FEW choices, use radiobuttons or checkboxes.
For a larger number of choices, use text entry boxes and parse the result
server-side.
I always love it when I'm looking for a local representative of a company
that has a handful of offices around the world, and the web droid who did
the page crammed every country in existence into a drop-down list.
Or credit card expiration dates from the past.
Or birth year selectors that go from 1900 to 2007.
Or all the other shit with which marketing folks cripple potentially useful
web pages.
robert
|
|
Posted by Jukka K. Korpela on August 22, 2007, 8:19 am
Please log in for more thread options
Scripsit Robert Latest:
> I always love it when I'm looking for a local representative of a
> company that has a handful of offices around the world, and the web
> droid who did the page crammed every country in existence into a
> drop-down list.
... as well as some non-existent countries, such as "Serbia and Montenegro",
and missing some of the existing countries, like "Serbia" and "Montenegro".
Allowing _all_ countries (for some definition for "country") might be
adequate e.g. in a form where you ask for a user's postal address or
nationality. Then the list of countries needs to be maintained somehow,
since changes _will_ take place. It need not be more difficult to maintain
it in the HTML source than to maintain it in the form handler, though. The
point is that one shouldn't aim at a list of all countries unless it's
really _needed_.
--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/
|
|
Posted by Harlan Messinger on August 22, 2007, 3:16 pm
Please log in for more thread options
Jukka K. Korpela wrote:
> Scripsit Robert Latest:
>
>> I always love it when I'm looking for a local representative of a
>> company that has a handful of offices around the world, and the web
>> droid who did the page crammed every country in existence into a
>> drop-down list.
>
> ... as well as some non-existent countries, such as "Serbia and
> Montenegro", and missing some of the existing countries, like "Serbia"
> and "Montenegro".
In the United States we have a similar situation, where dropdowns
listing the states and state-equivalents (the District of Columbia,
Puerto Rico, US Virgin Islands, etc.) including nations that were once
under US administration as part of the UN Trust Territory of the Pacific
but that became independent nations years ago. Though I admit I haven't
seen one that includes the Panama Canal Zone.
|
| Similar Threads | Posted | | Very Long Select !!! | May 10, 2006, 2:13 am |
| button element in Internet Explorer has too much left/right space when its text is long | November 3, 2005, 7:09 am |
| Can TR element be direct child node of TABLE element? | February 13, 2005, 12:17 pm |
| Make a sinlge long doc out of many | December 1, 2007, 11:05 am |
| Long URLs giving GET problems | January 28, 2005, 5:27 pm |
| Long navigation alternatives, to frames | November 22, 2005, 5:50 am |
| how to wrap this single long name in a table? | April 5, 2006, 10:20 am |
| splitting long attribute values | February 16, 2007, 10:05 pm |
| How long should I make my web page's Title, Description, & Keywords Meta Tag? | July 24, 2007, 11:34 am |
| search engines indexing robots/crawlers - how long does it take to index a page? | August 30, 2006, 9:11 am |
|