Jump to content

Archived

This topic is now archived and is closed to further replies.

GingerRobot

onDrag - firefox issues

Recommended Posts

Im having problems with the onDrag event in firefox - it seems to do absolutely nothing. Im wondering if this has an obvious solution - perhaps firefox doesn't support the onDrag event? If that's the case, does anyone know of an equivilant?

Any help would be much appreciated - as much as i hate IE, its doing me a favour by working at the moment and i dont like that :p

Share this post


Link to post
Share on other sites
Firefox doesn't support the ondrag trigger. You have to use a combination of onmouseover, onmousedown, onmouseup and onmouseout to know where your mouse cursor is and allow for a dragging feature. Basically, set each draggable object with a variable that turns true on mouseover (to let the browser know which object is currently able to be dragged), and false with mouseout. Then, when you have a mousedown event, just move whichever object is set to be able to be dragged, and you should have the equivalent of an ondrag event.

Hope this explanation helps.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.