If you do a VIEW SOURCE in the demo you'll find the drop handler:
Droppables.add('cart', {accept:'products', onDrop:function(element)
{new Ajax.Updater('items', '/shop/add', {onLoading:function(request)
{Element.show('indicator')}, onComplete:function(request)
{Element.hide('indicator')}, parameters:'id=' +
encodeURIComponent(element.id), evalScripts:true,
asynchronous:true})}, hoverclass:'cart-active'})
Just insert your own javascript in the OnDrop: to keep track of what
people have dropped in the basket, then pass the data off to your PHP
process when they're done.
On Mar 19, 12:41 pm, "Mojojo" <[EMAIL PROTECTED]> wrote:
> Hello.
>
> I am trying to make an drag and drop shop just
> ashttp://demo.script.aculo.us/shop
>
> But I want to do it without using ruby on rails, just plain PHP and
> script.aculo.us
>
> I have gotten so far that I can drag the items around on the screen
> but cannot figure out how it is dropped and into the basket
>
> Anyone got a simple example?
>
> Best regards
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---