Drag 'n Drop in a webpage

mugs

Lifer
Apr 29, 2003
48,920
46
91
This is what I need to do:
User has a bunch of images of objects. User has several different places that those objects could go. User drags an image of an object onto one of the target areas, drops it, form submits, server side script does its thing based on which image was dropped where, so on and so forth.

The server-side script is no problem (as long as I know which image was dropped and where it was dropped), but the client side code I have no idea on, I've never done anything like that.

I'd like this to work on any modern browser if possible. I don't even know what technology I'd use to do this... javascript?
 

notfred

Lifer
Feb 12, 2001
38,241
4
0
You can probably do it, but it'd require some fairly advanced DHTML stuff to work nicely, and I don't know how well you'll get it to work in more than one browser.
 

DaveSimmons

Elite Member
Aug 12, 2001
40,730
670
126
If the images are all fixed and coming from the server (you didn't say), then you could make a Flash object and have it make calls to its parent document to pass data via javascript.

That should work in any browser that supports Flash objects and javascript.