Jump to content


onDrag - firefox issues

  • Please log in to reply
1 reply to this topic

#1 GingerRobot

  • Staff Alumni
  • Advanced Member
  • 4,086 posts
  • LocationUK

Posted 24 October 2006 - 12:36 PM

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

#2 obsidian

  • Staff Alumni
  • Advanced Member
  • 3,202 posts
  • LocationSeattle, WA

Posted 24 October 2006 - 12:42 PM

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.
You can't win, you can't lose, you can't break even... you can't even get out of the game.

while (count($life->getQuestions()) > 0)
{   $life->study(); } ?>
  LINKS: PHP: Manual MySQL: Manual PostgreSQL: Manual (X)HTML: Validate It! CSS: A List Apart | IE bug fixes | Zen Garden | Validate It! JavaScript: Reference Cards RegEx: Everything RegEx

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users