amazing Ajax

Ralph van den Berg's picture

Script.aculo.us tricks are pretty cool. I especially like the click-and-drag list items (drag from one list to the other- it's in one of the demos). My question is: Is there some kind of onChange() function I can call so I can save the changes in the list order or new additions to one list (items dragged in from the second list)? It's not a problem for me to populate a list from a database, but I would like to save some kind of array of the items from a list where items have been added, removed, or rearranged.


look here ...

http://wiki.script.aculo.us/scriptaculous/show/Ajax.Updater

The general answer is you want to respond to something like an onchange event and send an http request back to the server, where a server side script can make updates to the database. That Ajax.Updater does something along those lines.