Support Forum Softcomplex logo
About Us  | Services  | Download  | Order  | Support  | |
| Search | Today's Posts | Stats | Board Rules | Not logged in [ Login | Register ]
go to bottom
Last active: Never

Printable Version | Subscribe | Add to Favourites   Post new thread Poll:
Author: Subject: dynamically changing slide bar min, max and step
susan
Junior Member

Posts: 2
Registered: 2/17/2009
Location: Cary NC
Member Is Offline
posted on 2/17/2009 at 03:43 PM Reply With Quote
dynamically changing slide bar min, max and step


I'm looking for a solution to dynamically change the max,min and step values of a slide bar.

I've written a short function to try to do this, but I have not been having luck getting it to work. I'm not attempting to change the appearance of the bar at all, just the working values on it. Unfortunately, I'm not sure if the problem is in my function, or in how I'm calling it. Any advice or suggestions would be appreciated!


function f_setslider(min, max, value, step){

//reset the slider values
this.n_minValue = min;
this.n_maxValue = max;
this.n_step = step;
this.n_value = value;
this.n_pix2value = this.n_pathLength / (this.n_maxValue - this.n_minValue);

}
View User's Profile View All Posts By User U2U Member
susan
Junior Member

Posts: 2
Registered: 2/17/2009
Location: Cary NC
Member Is Offline
posted on 2/17/2009 at 04:18 PM Reply With Quote

With some more experimenting, I've discovered that my code 'works' if i take it out of the function and put it directly in my script. I can't seem to call any of the slidebar functions from my script successfully. So my problem may be more an issue with javascript function calls than the slidebar class.


works:
A_SLIDERS[0].n_minValue = 10;
A_SLIDERS[0].n_maxValue = 300;
A_SLIDERS[0].n_step = 100;
A_SLIDERS[0].n_value = 1;
A_SLIDERS[0].n_pix2value = A_SLIDERS[0].n_pathLength / (A_SLIDERS[0].n_maxValue - A_SLIDERS[0].n_minValue);

doesn't work:
A_SLIDERS[0].f_setslider(10, 300, 100, 1);
A_SLIDERS[0].f_sliderSetValue(parseFloat(values[0]);

I'm probably out of the realm of this board, but does anyone have an explanation why the function calls aren't successful?
View User's Profile View All Posts By User U2U Member
Post new thread Poll:

Related Links:
Product Page
Product Demonstrations Live Demos
Multiple Designs
Equalizer
Free Download Free Download
Product Documentation Documentation:
Documentation Page
Change Log
Support Forum Support Forum

Go To Top


Powered by XMB 1.9.1 Nexus
Developed By Aventure Media & The XMB Group © 2002-2004