Help - Search - Members - Calendar
Full Version: Moveable objects and auto set?
Invision Power Services > Community Forums > Community Web Design and Coding
DonWilson
As seen here: http://confluence.atlassian.com/display/DO...+Tasklist+Macro and http://www.google.com/ig

I'm interested in learning how one would create something that would be able to move objects around the page (or a given table/div) to resort. I'm looking to create a small feature for a site that would have a list of images in three rows, 9 columns. When dragged, I would like to have the images move around and when "dropped," I want it to send the server the message the row and column moved to.

Does anyone here have any experience with this growing feature?

Thanks
.Kris
wat language you prefer to do this?
DonWilson
Any language that would supported by most, so obviously what ever google uses. If you mean server-side language, I'll use PHP.
DonWilson
Any idea? O_o
Rikki
It sounds simple but it's a surprisingly complex thing to do. I've recently written a drag'n'drop feature and it's over 400 lines long, and that doesn't include the Drag class or the Ajax class. And my feature didn't need 'snapping' to a region which is sounds like yours does.

I would suggest looking for some examples on the internet and dissecting them. I would also recommend some JS knowledge - it's not going to be easy if you don't know what you're looking at.
Brendon Koz
...just be careful. The macro example you gave is completely changeable by other users visiting the same page. I was toying around with moving the objects, but when I went to update one of the fields, I got an error because someone else viewing the same page had removed that specific task.
DonWilson
Indeed, I already know that malikyte. Thanks for the note.

Google is off my list because they like to name their functions aD(), d(), Yx() and the like.
Rikki
Yeah they compress their javascript, which is the reason it loads so fast. It also secures it somewhat, although there's several dissections online you could search for.

Just searching for 'javascript drag and drop' in Google will probably bring up a lot of useful stuff. You'll be lucky to find something that does exactly what you want though which is why I suggest a good knowledge of javascript or at least the ability to hack in stuff so that you can take the principles of other scripts but make them do what you need.
DonWilson
Indeed, I figured they did that for speed in mind.

I'll look around and if I see anything interesting I'll post it here for any others interested in this subject.
Nash12
QUOTE(Rikki @ Jun 2 2005, 04:15 PM) *
Yeah they compress their javascript, which is the reason it loads so fast. It also secures it somewhat, although there's several dissections online you could search for.


It must be really hard to debug googles JS, they donīt use any comments as far as I saw and use not very intuitive function or var names like the one mentioned. w00t.gif
.Reko
QUOTE(Nash12 @ Jun 3 2005, 08:46 AM) *
It must be really hard to debug googles JS, they donīt use any comments as far as I saw and use not very intuitive function or var names like the one mentioned. w00t.gif
They obfusicate it getlost.gif
Rikki
QUOTE(Nash12 @ Jun 3 2005, 08:46 AM) *
It must be really hard to debug googles JS, they donīt use any comments as far as I saw and use not very intuitive function or var names like the one mentioned. w00t.gif


I doubt the compressed version is the one they work on original.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.