Drop down list ranking/resequencing

  • Thread starter Avonelle Lovhaug
  • Start date
A

Avonelle Lovhaug

I need to create a javascript that re-orders items in a list. Here's
how it would work:

The page would present a list of items. To the left of each item would
appear a drop down list. The drop down lists would contain integers
for each item up to the number of items. (So, for example, if there
were 5 items in the list, the drop down list would contain: 1, 2, 3,
4, and 5.) Each drop down list would also contain a blank item, which
would initially default.

The user needs to rank each of the displayed items by selecting a rank
from the drop down list. If the selected rank hasn't already been
selected, no other changes should occur. However, if the user selects
a rank that has already been selected, then the other ranks should be
adjusted appropriately. For example, if the user selects a rank of "2"
when other items have been designated "2" and "3", then "2" should
become "3", and "3" should become "4". If the user changes an item
with a rank of "2" to a rank of "3", then the item that was "3" should
be changed to "2".

Has anyone seen anything like this? I'm doing something similar to
this in VB.NET + SQL on the server side, but this particular situation
calls for a client-side solution. Any assistance or pointers would be
greatly appreciated.

A. Lovhaug
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,049
Latest member
Allen00Reed

Latest Threads

Top