Spinner Control

  • Thread starter Thread starter Microsoft Newsserver
  • Start date Start date
M

Microsoft Newsserver

Hi

I need a client side spinner control. But I want the increments to speed up
the longer the mouse button is pressed. Does anyone know of a free or cheap
one I can lay my hands on.

Cheers.
 
spiners are usually done wioth an animated gif. you can not change the speed.
to change speed use a static images and use a javascript timer to change them
(air code).

<img src="spinEmpty.gif" id="spinner">
<button onclick="spin(200);">start spiner</button>
<script>
var spinIndex = 0;
var numOfImages = 16;
function spin(ms)
{
spinIndex = ++spinIndex % numOfImages;
if (spinIndex == 0) if (ms > 10) --ms;
var img = document.getElementById("spinner");
img.src = "spin" + spinIndex + ".gif";
window.setTimeout("spin(" + ms + ")",ms);
}
</script>

-- bruce (sqlwork.com)
 
HI

Thanks for your reply. I think perhaps I didnt make myself clear in my post,
sorry.

OK, actually, what I need is the following functionality.

I have a link/image etc and I need to be able to click on this link and hold
down the mouse button. Underneath the code needs to facilitate a number of
click events so that I can autoincrement a value without mutiple clicks.

I know spinners exist like this, infragistics has one, but it doesent do
exactly what I need, but the click hold is something that I do need.

Any idea, how I can invoke this functionality ?

Thanks
 
Back
Top