N
Nathan Sokalski
I am attempting to use the setInterval and clearInterval methods to allow
the user to make an action continuously happen while they hold down the
mouse button on an element. Here are the eventhandlers I am using for the
events:
onmousedown="var decrease=window.setInterval('incdec(-1)',200);"
onmouseup="window.clearInterval(decrease);
The onmousedown eventhandler is starting the Interval perfectly fine, but
the onmouseup does not seem to be doing anything. I could obviously create
an extra button to stop the Interval, but that would defeat the purpose of
being able to make an action repeatedly happen by holding the button down.
Any ideas why the onmouseup does not appear to be working, or does anyone
have any ideas as to another technique to use? Thanks. (NOTE: I have been
doing my testing on Windows XP Professional using Internet Explorer 6.0)
the user to make an action continuously happen while they hold down the
mouse button on an element. Here are the eventhandlers I am using for the
events:
onmousedown="var decrease=window.setInterval('incdec(-1)',200);"
onmouseup="window.clearInterval(decrease);
The onmousedown eventhandler is starting the Interval perfectly fine, but
the onmouseup does not seem to be doing anything. I could obviously create
an extra button to stop the Interval, but that would defeat the purpose of
being able to make an action repeatedly happen by holding the button down.
Any ideas why the onmouseup does not appear to be working, or does anyone
have any ideas as to another technique to use? Thanks. (NOTE: I have been
doing my testing on Windows XP Professional using Internet Explorer 6.0)