ondras
04-19-2007, 11:08 AM
Hi,
I am really stuck in solving the situation described in thread's title. I basically want to assign an event to element's 'mousedown' event, but I need to stop default action associated with such event.
I try:
function func(event) {
event.returnValue = false;
...do stuff here...
}
element.attachEvent("onmousedown",func);
This works for most event types, but not for 'mousedown'. In other words, the default action is always performed.
Reason for this: I need to implement drag&drop, but when I start dragging an image, a 'forbidden' cursor appears (as a result of default mousedown action).
Any help will be greatly appreciated.
I am really stuck in solving the situation described in thread's title. I basically want to assign an event to element's 'mousedown' event, but I need to stop default action associated with such event.
I try:
function func(event) {
event.returnValue = false;
...do stuff here...
}
element.attachEvent("onmousedown",func);
This works for most event types, but not for 'mousedown'. In other words, the default action is always performed.
Reason for this: I need to implement drag&drop, but when I start dragging an image, a 'forbidden' cursor appears (as a result of default mousedown action).
Any help will be greatly appreciated.