This Message Forum is no longer in use
Please use the new Bravenet Help Forums FOUND HERE
addEventListener/attachEvent seems to detach itself
I've been working on a drag and drop code using mousedown with setInterval to call a function to move it, and mouseup to cancel the interval.
It works exactly how I want it to except for one thing. I can move it anywhere I want the first mousedown/mouseup combination, but then next time I click on it nothing happens, I can't move it.
I know it is the mousedown listen that's the problem because the mouseup function still calls.
I've tried putting an alert in the function that starts the interval, it goes off once only. I tried placing it in the listener anonymous function, same thing.
I've tried it in IE8 and FF3.6, both show the exact same thing.
The code can be seen at the link below, but I'll post an edited version here.
Browser: Mozilla Firefox V3.6
OS: Microsoft Windows 7 RC
Okay, I worked out what the problem was. I was also moving another box at the same time (the box that was going to have content in) but I forgot to adjust for the height of the first box, so the moveable box was going behind the content box and blocking the click event.
_Scut
Browser: Mozilla Firefox V3.6
OS: Microsoft Windows 7 RC