473,396 Members | 2,154 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,396 software developers and data experts.

ondragstart and onmousemove messages

Hello,
I'm trying to do drag'n'drop where You can see elements that You are
dragging (table rows exactly) but I have small problem. Here is code sample

var move = false;
function onDragStart(id)
{
move = true;
return true;
}

document.onmousemove=function move(e)
{
if(move)
{
alert("move");
//do something
}
}

When I recive ondragstart events then all mousemove events are blocked and I
don't receive them. When I drop elements that once again I can receive
mousemove events. Anyone knows how to change it so I could reveive mousemove
events after onbegindrag?

--
Mariusz
Jul 23 '05 #1
2 2744
Ivo
"Mariusz" wrote
I'm trying to do drag'n'drop where You can see elements that You
are dragging (table rows exactly) but I have small problem. Here
is code sample

var move = false;
function onDragStart(id)
{
move = true;
return true;
}

document.onmousemove=function move(e)
{
if(move)
{
alert("move");
//do something
}
}

When I recive ondragstart events then all mousemove events are blocked
and I don't receive them. When I drop elements that once again I can
receive mousemove events. Anyone knows how to change it so I could
receive mousemove events after onbegindrag?


You don't say how you bind those functions to the events, that might give a
clue. Also, IE supports the "ondrag" event, which fires continually during a
drag operation, that may be of help.
--
Ivo


Jul 23 '05 #2

Użytkownik "Ivo" <no@thank.you> napisał w wiadomo¶ci
news:41**********************@news.wanadoo.nl...
"Mariusz" wrote
I'm trying to do drag'n'drop where You can see elements that You
are dragging (table rows exactly) but I have small problem. Here
is code sample

var move = false;
function onDragStart(id)
{
move = true;
return true;
}

document.onmousemove=function move(e)
{
if(move)
{
alert("move");
//do something
}
}

When I recive ondragstart events then all mousemove events are blocked
and I don't receive them. When I drop elements that once again I can
receive mousemove events. Anyone knows how to change it so I could
receive mousemove events after onbegindrag?


You don't say how you bind those functions to the events, that might give
a
clue. Also, IE supports the "ondrag" event, which fires continually during
a
drag operation, that may be of help.


Im just using oneventname in tag (a href="" onmousemove...). But I'v already
handled the problem. I'v just used onDrag event to handle mouse coordinates
update and now it works fine.
As far as I know onDrag is only supported by IE. Is this true? Maybe there
is something similiar in other browsers?

Cheers
Mariusz
Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Mich | last post by:
is the event ondragstart only for IE? In that case, how to use it in netscape 7? thank you
1
by: yingjian.ma1955 | last post by:
When I want to disable the select functionality, Can I just use onselectstart="return false"? I tried it and it works. But it seems people always put onselectstart="return false"...
5
by: Ravi | last post by:
In IE (tested IE6 on W2k&WXP) onmousemove event appears to fire continually when mouse is over the document and not moving or touched at all, even when mouse is physically detached from the...
5
by: Iouri | last post by:
I have added the Overrides proc onMouseMove like Protected Overrides Sub onMouseMove(ByVal e As System.Windows.Forms.MouseEventArgs) ........... End Sub This proc supposed to fire when I...
1
by: k.roemke | last post by:
Hello! After a longer time I want to do some javascript again. Task: set content of an iframe to the origin page if the mouse is not moved Problem: <iframe onmousemove="resetCounter();return...
15
hsriat
by: hsriat | last post by:
<body onmousemove="moveMe()"> This function can also be called as document.onmousemove = function {moveMe();}; Similarly what can be done for onmousemove="moveMe(event)" ?
1
by: EddieT | last post by:
Hi, I am planning to override the mouse movement to discrete steps so that i can get a coarser movement of the mouse for easier click of objects. However, I am not getting any trigger in the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.