Re: Mouse movement while a button is pressed

Giganews Newsgroups
Subject: Re: Mouse movement while a button is pressed
Posted by:  Janwillem Borleffs (j…@jwbfoto.demon.nl)
Date: Thu, 4 Sep 2003

"Jeroni Paul" <JERONI.PA…@terra.es> schreef in bericht
news:6c768c09.0309041118.2e5745…@posting.google.com...
>
> This simple example shows where my problem is. It works fine when all
> mouse buttons are released, and also if a button is pressed outside
> the image. But if a button is pressed inside the picture it'll not
> call onmouseout when the mouse is brought outside the picture. The
> worst is it'll never call it, leaving the button stuck pressed forever
> until mouse is moved over it again.

Try it with the onmousedown/onmouseup event handlers:

<IMG src="button"
      onmousedown="src='down.gif'"
      onmouseup="src='up.gif'"
>

Alternatively, you can throw in the onmouseover/out handlers as well...

JW

Replies

In response to

Mouse movement while a button is pressed posted by JERONI.PA…@terra.es (Jeroni Paul) on 4 Sep 2003