[thelist] Interface to add and reorder items on a list

Matt Warden mwarden at gmail.com
Wed Sep 22 13:52:46 CDT 2004

On Wed, 22 Sep 2004 14:03:25 -0400, Bill Creswell <billc at vaneerden.com> wrote:
> I store items in a table that includes order guide name, and sequences
> in another table, displaying them together for a customer to order from
> on the web.
> I am trying to figure out how to give the customer the ability to choose
> what items on their Order Guide, and in what order.
> The function would be like this
> http://guymal.com/mycode/select_box_manipulation/?right_select=bill%40ms
> .com&right_select=bart%40brat.com
> although I don't know if that is practical for a 150-400 item
> orderguide.
> Anyone do anything like this that I could take a look at? I am using

Yes, you are right. That would be a lot of clicks to make the 400th
item the 201st item.

I think your best bet would be an applet (or maybe flash, but I have
never used flash) that employed drag and drop. It wouldn't be too bad,
as there is a drag and drop package in the java foundation classes (or
one of its extensions). And, assuming this is an admin section of a
site, you have a good idea whether these people will have a late
enough version of java to support that.

If you're not into java, there's also the solution that involves a
small input box next to each item, in which holds an integer
representing its relative order:

[ 1 ] foo
[ 2 ] bar
[ 3 ] foobar
[ n ] barfoo

To re-order, the user would change the numbers:

[ n-1 ] foo
[ 2 ] bar
[ n ] foobar
[ 3 ] barfoo

I hate this design, because it's a lot of work on the user to figure
out what changes need to be made in order to, say, move the nth item
to the 3rd item, and move the 3rd to the n-1th item down one place --
and other such otherwise simple operations.

You might be able to come up with some fancy javascript that
automatically does shifting when the nth item is changed to the 3rd,
or something.

Just some ideas.

Matt Warden
Miami University
Oxford, OH

This email proudly and graciously contributes to entropy.

More information about the thelist mailing list