How do they do this?

L

laredotornado

Hello,

I do not know what to Google for, so maybe you could point me in the
right direction. If you look at

http://www.netvibes.com/

or even at Google's personalized home page, there is this ability to
drag and drop different pieces of content around. How is this done and
is there any freeware that you would recommend in doing this?

Thanks, - Dave
 
P

Peter Michaux

Hello,

I do not know what to Google for, so maybe you could point me in the
right direction. If you look at

http://www.netvibes.com/

or even at Google's personalized home page, there is this ability to
drag and drop different pieces of content around. How is this done and
is there any freeware that you would recommend in doing this?


There are several JavaScript libraries that have drag and drop

Yahoo! UI (doesn't have sortable lists built in but there are some
examples implementations)
Scriptaculous (dependent on Prototype.js so stay clear)
Walter Zorn (I don't think this library has sortable lists built in)

I wouldn't recommend any of these libraries for sortable lists.
Sortable lists are a tricky problem and when the lists get even 20
elements or longer these implementations slow down in responsiveness. I
don't think there is a one size fits all solution for sortable lists in
browsers.

I've worked on creating a very fast and flexible drag drop library but
it still take some programming to make any particular implementation.
I've written a couple blog posts about my approach if you want to dive
into this...

http://peter.michaux.ca/article/15
http://peter.michaux.ca/article/51

My library is in alpha stage and when I get more time I hope to get to
beta before the new year but maybe the ideas will help you.

Peter
 
V

VK

drag and drop different pieces of content around. How is this done and
is there any freeware that you would recommend in doing this?

Very generically: it is done by listening mouse events and by changing
element style.top and style.left

You may take a look at <http://developer.yahoo.com/yui/dragdrop/>
library. No commitment from my side :) but it seems the most robust
and friendly among others.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,224
Latest member
BettieToom

Latest Threads

Top