Comments
Article Comments (18 total)
Thank you very much for the article. For the past 10 months I have been looking for this script. I have developed a application for a client. They said we want have specific items to appear at the top as they needed the most. I wanted to work on a very complicated drop down menu; but could not do it. This is exactly what I wanted. Now the user can arrange the list in any way he wants.
This is such a cool script. I can't believe I'm the first person to comment on it. I have a wrinkle for you that I can't figure out because I'm so new to both Ajax and Scriptaculous.
This example works great if you're sorting every record in your database, but I only want to sort segments of it at a time (I use another table to pull the various subsets of records). I want to create a user interface that allows someone to select a subset via a $_REQUEST variable, and sort only those few records, and then request another subset, sort only those, etc.
The records will only display w/in their subsets so the rolling sort order does not matter, just how it sorts with like records.
The problem comes in with passing the $_REQUEST variable to the update fuction. I can display the subsets just fine, but when I actually update them, it only updates the records called in the first request variable I've chosen, and doesn't reset with each new $_REQUEST. Can you help? Do I make it a Session variable instead?

![Prototype and Scriptaculous in Action [Ajax]](http://ecx.images-amazon.com/images/I/51u%2B5Y4BSLL._SL75_.jpg)
Great Tutorial, I was wondering how you can get additional fields to display on each line. eg. say title and add a line for year. Thanks in advance.