Email conversation
From | Lori Manney |
To | Me |
Subject | set slider control position |
Date | 20 August 04 15:35 |
Hi!
I love your slider control! The only problem I'm having is setting the
position when the page loads... It seems like the setPosition() function
will only set the slider to 0 or 'maximum'. Is there any way to set it to
a specific value? Like 45%, etc.?
Thanks for your help!
Lori
From | Me |
To | Lori Manney |
Subject | Re: set slider control position |
Date | 27 August 2004 00:19 |
Lori,
> It seems like the setPosition() function will only set the slider to 0 or
> 'maximum'.
> Is there any way to set it to a specific value? Like 45%, etc.?
Indeed there is, and I think I know what you have done wrong when trying to
do this.
The slider position must be set with a floating point (decimal point)
number between 0 and 1. To set it to 45%, you must use a fraction or
decimal point value:
setPosition(0.45)
The usual mistake is to try to use 45 instead of 0.45 - the slider is
forced to reduce this to the maximum value of 1.
Hope this helps
Mark 'Tarquin' Wilton-Jones - author of http://www.howtocreate.co.uk/