|
||
Dragging and DroppingUsing AJAX, user interfaces such as dragging and dropping become possible. We will briefly cover that here.Dragging and dropping involves two items
In Jaxcent, you set an element draggable just by calling
To make something a drop-target, you just override
the
The Drag and drop will typically change your underlying data structure, and therefore will often involve working with the session. For this example, we are not going to save anything in the session, because we just want to see how drag and drop can be made to work. We will have two paragraphs, both of which serve as both a source as well as a target. They can be dragged and dropped on each other. The dropped one gets moved before the other one!
Exercise:
Write an HTML file with two paras and a matching Java file.
Each of the two paras overrides the |
||
|