473,386 Members | 1,699 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

limiting drag drop to an area

my initial design required dropping of elements from one div into other(workspace). and from the workspace to a div called trash. i implemented it successfully with javascript.
but my problem is that these elements are still draggable to unwanted areas after dropped into workspace. i cannt change the properties of the elements dropped into workspace to nodrag, since they have to be draggable and droppable into trash.
also, once navigated to other pages, and on returning sm of these elements are no more draggable.

is there a construct in javascript or a snippet to restrict the movement of draggable objects?
and ne ideas upon y retrieval of page renders sm objects undraggable?

help appreciated
Apr 14 '07 #1
1 1460
mrhoo
428 256MB
set the mousemove listener for a draggable item on mouse down,
to its containing element- stop the drag and remove the handler on mouseout of the container. Create a temporary bounding box, if you need it.
Apr 15 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Clyde | last post by:
I am trying to implement the user feedback provided by Windows Explorer when draggng a filename from one place to another. I have the drag and drop action worked out but have had no luck in...
2
by: Barry Moon | last post by:
Hi Can anyone give me any help with passing an object across processes, via drag and drop? I've written a custom ListView control, which supports dragging and dropping of its items. The...
0
by: CIRE1975 | last post by:
How do I create a drag and drop item on an asp.net web for that will allow my web site consumers to use. I want to have rectangles located on the left of the screen on the web form and allow the end...
0
by: Neven Klofutar | last post by:
Hi, I would like to create something like a "puzzle control" that could use drag and drop technique to put together the "whole picture". I would like to set some fixed areas on the page so when...
5
by: Chris Johnson | last post by:
Hi guys, I'm working on a application that I want to drag a file into, and at the time of dropping, get the full path of the file. But, what I really want is to drag the file to a waiting...
0
by: jongwoonlee | last post by:
Hi, I don't have much experience in c# .net, so please bear with me. I would like to have some advice if possible. the goal is 1. there are several user defined(maybe the existing common...
1
by: kidelectric | last post by:
The issue I am having is that I would like to be able to drag-and-drop div elements that have rounded corners.* Since these elements will be dynamically created (including background color), I could...
2
by: =?Utf-8?B?VHJlY2l1cw==?= | last post by:
Hello, Newsgroupians: I've been looking on the Internet for some resources to create a simple drag-and-drop application, but they all seem too complicated or not what I need. I have created a...
0
by: munishbatra2002 | last post by:
hi all, we are using a gridview and a treeview control ... we want to drag a row from gridview control and drop it onto treeview control on a web page... we are using C# ASP.NET ... can anyone...
8
by: Himzi | last post by:
Hi, I have made a webpage with 3 divs and have put images / text on these pages which can be dragged. I want to limit the area in which the user can drag the text. The user will be allowed to drag...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.