Lori Manney

Navigation

Skip navigation.

Search

Site navigation

Email conversation

FromLori Manney
ToMe
Subjectset slider control position
Date20 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
FromMe
ToLori Manney
SubjectRe: set slider control position
Date27 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/
This site was created by Mark "Tarquin" Wilton-Jones.
Don't click this link unless you want to be banned from our site.