|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
doing a mouse up event but stopping the click
is this possible?
I have a javascript drag/drop thing going on. problem is that I also want to have a click event on the same button. can I distingish between the too. right now the drap/drop works but the click even it still happening, I wish to cancel this event inside the mouse up event to release the drag. I have tried a few things and nothing works. Will this also allow me to do the click event? thanks |
|
#2
|
||||
|
||||
|
RE: doing a mouse up event but stopping the click
Can't you do onclick='javascript: return false' and use onmousedown and onmouseup events for the drag and drop?
|
|
#3
|
|||
|
|||
|
RE: doing a mouse up event but stopping the click
maybe I did not explain myself completely, here we go.
have a button, this button can be clicked and something can happen. this button is also movable. you can click on it and drag it around then release. what I want to do is be able to have this functionality for both. so the browser can distingush between a click and an seperate mouse down and up |
|
#4
|
|||
|
|||
|
RE: doing a mouse up event but stopping the click
maybe I did not explain myself completely, here we go.
have a button, this button can be clicked and something can happen. this button is also movable. you can click on it and drag it around then release. what I want to do is be able to have this functionality for both. so the browser can distingush between a click and an seperate mouse down and up |
|
#5
|
|||
|
|||
|
RE: doing a mouse up event but stopping the click
see it this way: you have to distinquish between a click (which is a mousedown followed by a mouseup) and between drag and drop (which is a mousedown, followed by movement while the mousebutton is down, and a mouseup).
Solution would be to track the movement after the mousedown (which you need anyway), and during that set some indication that the onclick should not be executed. |
|
#6
|
|||
|
|||
|
RE: doing a mouse up event but stopping the click
Hi,
I have just seen this post.I too need to implement drag and drop through javascript in my project.Could you guys please post me the code patch that would do the drap n drop. I appreciate your quick response.Very urgent. Thanks much, -Aparna. |
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Client Side Things > doing a mouse up event but stopping the click |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|