Mouse events

Discussion in 'Javascript' started by RC, Jun 6, 2006.

  1. RC

    RC Guest

    I know some JavaScript mouse events are:

    onClick, onMouseOver, onMouseOut, onMouseDown and onMouseUp.

    Are there more like:

    onMousePress, onMouseDrag, onMouseMove

    In Java there are:

    mouseClicked, mouseEntered, mouseExited, mousePressed, mouseReleased,
    mouseDragged, mouseMoved and mouseWheelMoved.

    Also in Java can detected which mouse button (left, middle or right)
    has pressed, released or dragged.

    Thank Q!
    RC, Jun 6, 2006
    #1
    1. Advertising

  2. JS does not provide convenient little functions for you to get all of
    that data, but the event itself has this information available to it. I
    recommend reading http://www.quirksmode.org/js/events_properties.html
    to get a better handle on what can be done here.

    This should handle that stuff. Most people doing extensive event work
    like this usually write little wrappers for event management that
    provide cleaner functionality. Look into prototype.js or dojo's events
    system for some examples.

    -E

    RC wrote:
    > I know some JavaScript mouse events are:
    >
    > onClick, onMouseOver, onMouseOut, onMouseDown and onMouseUp.
    >
    > Are there more like:
    >
    > onMousePress, onMouseDrag, onMouseMove
    >
    > In Java there are:
    >
    > mouseClicked, mouseEntered, mouseExited, mousePressed, mouseReleased,
    > mouseDragged, mouseMoved and mouseWheelMoved.
    >
    > Also in Java can detected which mouse button (left, middle or right)
    > has pressed, released or dragged.
    >
    > Thank Q!
    Eric Ryan Harrison, Jun 6, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Davisro
    Replies:
    2
    Views:
    1,288
    Jim Corey
    Apr 23, 2004
  2. Max
    Replies:
    7
    Views:
    9,078
  3. Claus Atzenbeck
    Replies:
    1
    Views:
    1,062
    Claus Atzenbeck
    Nov 26, 2004
  4. =?Utf-8?B?am9qb2Jhcg==?=
    Replies:
    1
    Views:
    4,072
    wwwtar
    Oct 2, 2006
  5. Chris

    Events Events Events Please Help

    Chris, Aug 30, 2005, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    338
    Chris
    Aug 30, 2005
Loading...

Share This Page