SiteExperts.com Logo Home | Community | Developer's Paradise
User Groups | Site Tools | Site Information | Search
 Main Menu
 Resource

Drag-Drop Framework

Categories...
Language
JavaScript
Product
IE4
Task
Drag and Drop, Utilities
Technology
Dynamic Positioning, Dynamic Style

Sponsored Links
Developer's Paradise : Inside Technique :
Drag-Drop Framework
Submission by SiteExperts Staff

Go to the resource:
Drag-Drop Framework

Add to Assistant

Short Description
A framework for adding drag-drop with drag sources and drag targets to your web page.

Long Description
A framework for adding drag-drop with drag sources and drag targets to your web page.

Author
Scott Isaacs
Submission URL
http://www.SiteExperts.com/tips/styles/ts28/page1.asp
Submission Date
Sep 30,1997
 

Discussion and Rate this Resource
Overall Rating: 4.5

lkoudal on Jun 18, 2003 at 6:01:25 AMRating: 5
Excellent code, however, i seem to be having some trouble trying to modify the code to limit the user to only drag in the y-axis. if i modify the code, by removing a variable, it seems not to detect drop-targets anymore. any comments to help me?
Frankp on Feb 20, 2003 at 7:37:15 AMRating: 5

I thought I clarify my dilema and see if someone can help me!

I am trying to use the drag and drop framework to drag an image1 and place it over another image0.
I would then like to know the coordinates of where i left the image1. This is so I can save the coordinates in a database and later reposition it.
Image0 is a map with regions on it. I would then like to know what region of the map I dropped it in.
Example I drop an image on a map of the USA ( Map is one image).  I need to get the coordinates of where I dropped and also get back the name of the State where I dropped it.
So far, using the drag and drop frmework, I have been able to drag and drop the image,  and get the coordinates of where I dropped the Image1, but I can not retrieve the name of  the state.
I have used the the MAP and Area to define the states but when I drop the image I am not on the MAP object but the IMG object.
I played around with the z-index and I do get to the Area object but then my images don't display
Can someone help me? or give me a hint?

Frankp on Feb 19, 2003 at 6:55:03 AMNo Rating

I would appreciate if someone can help me by giving me a pointer on how i can modify htis code to drop an image onto an AREA. This example drops images into a rectangular area. I am trying to drop an image onto an area in a map. I tried using an IMG with a usemap and can not retrieve what area of the map i dropped the image.

Really appreciate teh help

Thank You.

Frankp on Feb 16, 2003 at 1:45:41 PMRating: 5
I am still interesed in how this framework can be modified to allow a polygon instead of an rectangle to be used as the target where one can drop the dragged item.
ChrisNightingale on Jun 1, 2001 at 6:39:26 AMRating: 4

Very good example.  Can this functionality be extended across frame boundaries?  Note:  There seem to be some discrepancies in the actual source code and the code listed on the final page.  E.g. in the testOver() function is the following line of code which doesn't make sence.  Typo maybe!?!?!?

for (var intLoop=0; intLoop el._top) && (iLeft > el._left) && (iLeft+elDragged.offsetWidth < el.offsetWidth+el._left) && (elDragged.offsetHeight+iTop < el.offsetHeight+el._top)) {
                 

More Ratings/ Comments


To rate and comment on a resource, you must first logon.

If you are not registered, please register yourself to become a member of the SiteExperts.community.

User Name
Password

Copyright © 1997-2008 InsideDHTML.com, LLC. All rights reserved.