ondragstart and onmousemove messages

M

Mariusz

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?
 
I

Ivo

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.
 
M

Mariusz

U¿ytkownik "Ivo said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top