I would appreciate autorepeat with increasing speed every n'th tick until the mouseup event. I've done this in Javascript but need to improve the structure. In this case I guess a good solution would be to let the mousedown handler register element id, up/down direction and other params to the timer callback, make the first call to up/down, finally set off the timer. The mouseup handler will stop the timer. In the timer callback step will be incremented every n'th tick (to increase speed).
Unfortunately the demo doesn't work in IE6/IE7 for the text fields ('Object doesn't support this property or method'). Maybe the 'string' parameter in the call to up()? Numeric fields are OK.
I was unable debug this problem because I get a parse error (unexpected $end … SSpinner.php … on line 313) when including SSpinner in my page.
I would appreciate autorepeat with increasing speed every n'th tick until the mouseup event. I've done this in Javascript but need to improve the structure. In this case I guess a good solution would be to let the mousedown handler register element id, up/down direction and other params to the timer callback, make the first call to up/down, finally set off the timer. The mouseup handler will stop the timer. In the timer callback step will be incremented every n'th tick (to increase speed).
Unfortunately the demo doesn't work in IE6/IE7 for the text fields ('Object doesn't support this property or method'). Maybe the 'string' parameter in the call to up()? Numeric fields are OK.
I was unable debug this problem because I get a parse error (unexpected $end … SSpinner.php … on line 313) when including SSpinner in my page.
/Tommy
The problem in IE was an ID conflict of 2 elements. It's fixed now
Alaso as you can see there's a new version where when you keep the mouse button pressed the spinner increases/dicreases faster
Probably I get the parse error because I didn't enable "short_open_tag" in php.ini
But, here is a quote from the PHP manual
Quote
Note: Using short tags should be avoided when developing applications or libraries that are meant for redistribution, or deployment on PHP servers which are not under your control, because short tags may not be supported on the target server. For portable, redistributable code, be sure not to use short tags.
The stepping rate is too fast, I think. My thought was to have an incremental stepping rate, starting with some initial rate and increasing with time elapsed since mousedown.
You can set the delay of the spinner's value update so you can control the speed of the spinner when the mouse is kept pressed on a button (Spinner's delay parameter)
Also when button is kept pressed this speed increases (Spinner's acceleration parameter. Values can be "none", "slow" , "normal" and "fast")
You can set the delay of the spinner's value update so you can control the speed of the spinner when the mouse is kept pressed on a button (Spinner's delay parameter)
Also when button is kept pressed this speed increases (Spinner's acceleration parameter. Values can be "none", "slow" , "normal" and "fast")
If you want it in 2 spinners it's easy to set one for the hours and one for the minutes
If you mean something like 00:00, 00:30,1:30,2:00 etc it can't be done but it's a good idea so i'll try to implement it right now and I'll let you know