469,336 Members | 5,570 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,336 developers. It's quick & easy.

Mouse events

RC
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!
Jun 6 '06 #1
1 6921
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!


Jun 6 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by John Champaign | last post: by
1 post views Thread by Jean-Gael GRICOURT | last post: by
3 posts views Thread by Charles Law | last post: by
5 posts views Thread by Adeel | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by Marylou17 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.