views:

494

answers:

2

Hi All,

I have some items in panel A along with some descriptions like time of delivery. All items in different div. In the second panel I have list of drivers with different timings like 9AM, 10AM and so on.

Now I need, that, when I drag and drop itemA from Panel1 to DriverA in panel2, I want that the item shoud be added to the dropped driver(DriverA) and the the cell of that particular driver with timing (say if item has to be delivered at 10AM , then then cell of driver with 10 AM changes the color to red).

I need all this to be done with javascript. Please help, urgent.

Thanks & Regards Khushi

+4  A: 

There is support in jQuery for drag and drop.

See http://www.codeproject.com/KB/webforms/JQueryPersistantDragDrop.aspx and the documentation of jQuery.

DanSingerman
+1  A: 

Do this with a JavaScript framework like jQuery together with an AJAX framework like Prototype.

Make the Elements droppable with jQuery: http://jqueryui.com/demos/droppable/

Then store the information with an AJAX call using Prototype and the callback functions of the jQuery methods.

Lennart
Isn't using jQuery alone a simpler/better solution? What are the advantages of introducing prototype as well?
DanSingerman
Can jQuery do the AJAX calls as easy as Prototype?
Lennart
I use jQuery a lot for Ajax. I don't see any problem with it.
DanSingerman
Ah. Okay. :) Then Kuhshi can skip Prototype. ;) Thank you!
Lennart
and so can you :-) Long live jQuery! :-)
Natrium
@Natrium haha. jQuery is truly stupendous. John Resig is a genius
DanSingerman