ondragstart and onmousemove messages

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Mariusz

    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.onmous emove=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


  • Ivo

    #2
    Re: ondragstart and onmousemove messages

    "Mariusz" wrote[color=blue]
    > 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.onmous emove=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?[/color]

    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








    Comment

    • Mariusz

      #3
      Re: ondragstart and onmousemove messages


      U¿ytkownik "Ivo" <no@thank.you > napisa³ w wiadomo¶ci
      news:41bf630a$0 $8913$abc4f4c3@ news.wanadoo.nl ...[color=blue]
      > "Mariusz" wrote[color=green]
      >> 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.onmous emove=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?[/color]
      >
      > 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.[/color]

      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


      Comment

      Working...