newbie mousedown question

D

Disco

i have an image on a webpage and i want to know when the user has a mouse
button pressed and held down on it.. and i want to execute some code until
the user releases the button

like a scrollbar arrow button

there must be a pretty simple answer however ive searched the net and havent
come up with it : \

tia!
 
G

Grant Wagner

Disco said:
i have an image on a webpage and i want to know when the user has a mouse
button pressed and held down on it.. and i want to execute some code until
the user releases the button

like a scrollbar arrow button

there must be a pretty simple answer however ive searched the net and havent
come up with it : \

tia!

Capture the onmousedown event for that element and do whatever you want to do
until you capture the onmouseup event for that element.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,188
Latest member
Crypto TaxSoftware

Latest Threads

Top