By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,837 Members | 1,766 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,837 IT Pros & Developers. It's quick & easy.

Creating interactive user-controlled ordering mechanisms on admin web interfaces?

P: n/a
(originally posted to one of macromedia's groups; no help, so hopefully
someone here can help me out. I'm using VBScript ASP.)

When designing administrative interfaces to websites, we often need to
provide users with a mechanism to change the order of items that are listed
on the page.

I have not come up with a graceful and elegant way to offer an interactive
ordering capability on administration forms, as you see in many desktop
apps. You can design various hacks -- say, allowing the user to designate
items "high priority" to trump mechanized ordering solutions, or allow the
user to assign an order integer or letter to each items. However, all of
these methods have a hacky, sucky quality to them.

What I would like is a means of allowing users an easy-to-use and
interactive way to adjust the order of listed records. Ideally I would like
some way that the user could select an item and/or make a single item go up
and down in the list on the admin page, and have that list order reflected
on the final page. Perhaps you print an imagemap "up" and "down" arrow
adjacent each listing, and pressing the "up" or down" button moves it up or
down. Or perhaps you have some client-side javascript widget that allows
selection and then movement via a single set of up/down controls.

There's three components to this: how you handle the ordering on the
database side, how you handle the UI issues on the web application, and how
you update the database information appropriately based on the user's input.

The hardest part of this problem is figuring out what needs to happen on the
database side: you have a collection of "ordering" values, with one each
presumably associated with each database record, and presumably you need ALL
the items updated for the collection of items you're administering.
Otherwise, you end up with messed-up situations where there are two
identically ordered items and the application doesn't know the right thing
to do.

Or maybe you somehow store the list order of items for a "publication" in a
single field on tblPubs, split the itemIDs out into an array, and update as
necessary. Somehow this approach feels like it may invite the wrath of the
database purity zealots, and it may not work well for open-ended
publications (e.g. an online newspaper that is continually updated.)

There may be a widget in ASP that's a cousin to concept like "queues" or
"stacks" that could help us.

Answering a small piece of my own question: this article has some tidbits
that may help:
http://www.4guysfromrolla.com/webtech/102799-1.shtml

Some smart person out there has solved this, and maybe you even have a link
to an article or tutorial. Can anyone suggest a solution and/or a starting
point?

Thanks,
KF


Jul 19 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
On Wed, 31 Dec 2003 10:27:55 -0800, "Ken Fine"
<ke*****@u.washington.edu> wrote:
(originally posted to one of macromedia's groups; no help, so hopefully
someone here can help me out. I'm using VBScript ASP.)

When designing administrative interfaces to websites, we often need to
provide users with a mechanism to change the order of items that are listed
on the page.

I have not come up with a graceful and elegant way to offer an interactive
ordering capability on administration forms, as you see in many desktop
apps. You can design various hacks -- say, allowing the user to designate
items "high priority" to trump mechanized ordering solutions, or allow the
user to assign an order integer or letter to each items. However, all of
these methods have a hacky, sucky quality to them.

What I would like is a means of allowing users an easy-to-use and
interactive way to adjust the order of listed records. Ideally I would like
some way that the user could select an item and/or make a single item go up
and down in the list on the admin page, and have that list order reflected
on the final page. Perhaps you print an imagemap "up" and "down" arrow
adjacent each listing, and pressing the "up" or down" button moves it up or
down. Or perhaps you have some client-side javascript widget that allows
selection and then movement via a single set of up/down controls.

There's three components to this: how you handle the ordering on the
database side, how you handle the UI issues on the web application, and how
you update the database information appropriately based on the user's input.


Okay, the first is easy enough to follow, but I'm not sure I
agree/understand these three "components". The database doesn't care
what order the records are in, you only care on the user interface.
If you have to reload them in the same order in a different session,
create a table called UIOrder with two fields, the item number (or
whatever ID you use to identify unique records in your other table(s)
) and the order number. You'll need to update the order number for
all records, which may be a performance issue, but it's a small table
with only two columns and you could probably do a bulk update. I
can't imagine you'd be trying to have a user set an order for a
thousand items in a table anyway. This gets even simpler if you don't
need to maintain the order past the session, since you should be able
to use client-side code to do it.

Jeff
Jul 19 '05 #2

P: n/a
ljb
The code here will client-side sort an html table on any column. The sorted
order does not persist for the next session. Large tables may take a long
time to sort.

http://www.romankoch.ch/capslock/tablesort.htm

LJB
Jul 19 '05 #3

P: n/a
"ljb" wrote:

The code here will client-side sort an html table on any
column. The sorted order does not persist for the next
session. Large tables may take a long time to sort.


Error: document.all is not a function
Source File: http://www.romankoch.ch/capslock/tablesort.htm
Line: 70
--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
Jul 19 '05 #4

P: n/a
ljb
I don't think I can help. The page,
http://www.romankoch.ch/capslock/tablesort.htm, works fine for me in IE6. I
use the code in my own pages without any problems either.

LJB

"Dave Anderson" <GT**********@spammotel.com> wrote in message
news:ux****************@TK2MSFTNGP09.phx.gbl...
"ljb" wrote:

The code here will client-side sort an html table on any
column. The sorted order does not persist for the next
session. Large tables may take a long time to sort.


Error: document.all is not a function
Source File: http://www.romankoch.ch/capslock/tablesort.htm
Line: 70

Jul 19 '05 #5

P: n/a
On Wed, 31 Dec 2003 14:17:51 -0600, "Dave Anderson"
<GT**********@spammotel.com> wrote:
in <ux**************@TK2MSFTNGP09.phx.gbl>
"ljb" wrote:

The code here will client-side sort an html table on any
column. The sorted order does not persist for the next
session. Large tables may take a long time to sort.


Error: document.all is not a function
Source File: http://www.romankoch.ch/capslock/tablesort.htm
Line: 70


It also works great in Opera 7.20 which is generally more
finicky. What browser are you using?
Jul 19 '05 #6

P: n/a
"Stefan Berglund" wrote:

Error: document.all is not a function
It also works great in Opera 7.20 which is generally more
finicky.


Shame on Opera for supporting document.all.

What browser are you using?


Exactly my point. If the code were written to W3C standards, you wouldn't
need to ask that question. For what it's worth, I use:
Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.5) Gecko/20031007
--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
Jul 19 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.