PDA

View Full Version : losing the onmouseup event


python
11-28-2003, 04:01 PM
hello, I am trying to catch the onmouseup event on an image.
I am also catching the onmousemove event. Whenever the user releases the mouse button WHILW moving the mouse, the onmouseup event is NOT triggered.

here is some code:

<script language="javascript">

function mouseup() {
alert("mouse up");
}

function mousemove() {
window.status = "moving...";
}
</script>

<body>
<img onmouseup ="mouseup()" onmousemove="mousemove()" />
</body>

the "mouse up" alert will not show. What am I doing wrong?

Kor
11-28-2003, 05:21 PM
well... onmousemove is an event handler for no objects as default. This may be your problem.

If you wanna use this event you must set the object to capture the event...

Any way... peculiar sequence you need :)