Hey, I'm looking for an AJAX, preferably Mootools based, script that will enable elements from a list to be dragged on to one of several target divs. This in turn will then trigger a PHP database update by AJAX. I've found a ton of scripts that allow for lists to be sorted with a DB update, but I need to be able to drag out of the list and drop into a 'box'. To give some background, this is for a wedding planner, where there will be a list of confirmed guests on one side of the page, and divs representing a number tables on the other - I need to be able to assign guests to tables using drag and drop. Anybody out there know of a script that will allow me to do this? Thanks in advance
Take a look at this example - http://jqueryui.com/demos/droppable/#photo-manager Although it uses jquery, I suppose you can use it too. I suppose it provides necessary callbacks to init ajax requests. Also take a look at draggable demo, maybe you'll find something interesting.
That photo manager link is definitely the kind of thing I am looking for - the problem is that this is to be incorporated into a page that uses mootools for other functionality already, and whenever I've tried using jquery and mootools together they haven't played nicely! Thanks for the suggestion though - definitely getting closer! Anybody else have any ideas?
it's very simple to do - mootools more has built-in support for it... check Drag.Move - http://mootools.net/docs/more/Drag/Drag.Move within the onDrop event you can call the ajax function. sorted!