disable slider onchange

C

cmgmyr

Hello,
I'm trying to figure out how to disable a slider through the onChange
function. Here is what I have so far:

new Control.Slider('handle','slider',
{
axis:'horizontal',
sliderValue: 1,
range: $R(1, 100),
alignY:0,
values: [<?php echo $values ?>],
onSlide:function(v){
onSlide(v)
},
onChange:function(v){
onChange(v)
}
});

After my onChange(v) function, I want to disable the slider, how can I
do this?

Thanks in advance,
-Chris
 
V

VK

Hello,
I'm trying to figure out how to disable a slider through the onChange
function. Here is what I have so far:

new Control.Slider('handle','slider',
{
axis:'horizontal',
sliderValue: 1,
range: $R(1, 100),
alignY:0,
values: [<?php echo $values ?>],
onSlide:function(v){
onSlide(v)
},
onChange:function(v){
onChange(v)
}
});

After my onChange(v) function, I want to disable the slider, how can I
do this?

What slider is that, from what library? Or is it your own?
 
C

cmgmyr

Hello,
I'm trying to figure out how to disable a slider through the onChange
function. Here is what I have so far:
new Control.Slider('handle','slider',
        {
                axis:'horizontal',
                sliderValue: 1,
                range: $R(1, 100),
                alignY:0,
                values: [<?php echo $values ?>],
                onSlide:function(v){
                        onSlide(v)
                },
                onChange:function(v){
                        onChange(v)
                }
        });
After my onChange(v) function, I want to disable the slider, how can I
do this?

What slider is that, from what library? Or is it your own?- Hide quoted text -

- Show quoted text -

it's from scriptaculous
 
V

VK

Hello,
I'm trying to figure out how to disable a slider through the onChange
function. Here is what I have so far:
new Control.Slider('handle','slider',
{
axis:'horizontal',
sliderValue: 1,
range: $R(1, 100),
alignY:0,
values: [<?php echo $values ?>],
onSlide:function(v){
onSlide(v)
},
onChange:function(v){
onChange(v)
}
});
After my onChange(v) function, I want to disable the slider, how can I
do this?
What slider is that, from what library? Or is it your own?- Hide quoted text -
- Show quoted text -

it's from scriptaculous

Then read the producer manuals:
http://github.com/madrobby/scriptaculous/wikis/slider
 
C

cmgmyr

Hello,
I'm trying to figure out how to disable a slider through the onChange
function. Here is what I have so far:
new Control.Slider('handle','slider',
        {
                axis:'horizontal',
                sliderValue: 1,
                range: $R(1, 100),
                alignY:0,
                values: [<?php echo $values ?>],
                onSlide:function(v){
                        onSlide(v)
                },
                onChange:function(v){
                        onChange(v)
                }
        });
After my onChange(v) function, I want to disable the slider, how canI
do this?
What slider is that, from what library? Or is it your own?- Hide quoted text -
- Show quoted text -
it's from scriptaculous

Then read the producer manuals:http://github.com/madrobby/scriptaculous/wikis/slider- Hide quoted text -

- Show quoted text -

Thanks, but I read those already. How do I put that into my onchange
function though?

onChange:function(v){
onChange(v)
$('slider').setDisabled = true
}
Doesn't work.
 
V

VK

Hello,
I'm trying to figure out how to disable a slider through the onChange
function. Here is what I have so far:
new Control.Slider('handle','slider',
{
axis:'horizontal',
sliderValue: 1,
range: $R(1, 100),
alignY:0,
values: [<?php echo $values ?>],
onSlide:function(v){
onSlide(v)
},
onChange:function(v){
onChange(v)
}
});
After my onChange(v) function, I want to disable the slider, how can I
do this?
What slider is that, from what library? Or is it your own?- Hide quoted text -
- Show quoted text -
it's from scriptaculous
- Show quoted text -

Thanks, but I read those already.

Did you? I am not convinced: because on the linked page setDisabled is
documented as a method that takes no arguments:
"setDisabled (none) Will set the slider to the disabled state
(disabled = true)"

So:

$('slider').setDisabled()
 
C

cmgmyr

Hello,
I'm trying to figure out how to disable a slider through the onChange
function. Here is what I have so far:
new Control.Slider('handle','slider',
        {
                axis:'horizontal',
                sliderValue: 1,
                range: $R(1, 100),
                alignY:0,
                values: [<?php echo $values ?>],
                onSlide:function(v){
                        onSlide(v)
                },
                onChange:function(v){
                        onChange(v)
                }
        });
After my onChange(v) function, I want to disable the slider, howcan I
do this?
What slider is that, from what library? Or is it your own?- Hide quoted text -
- Show quoted text -
it's from scriptaculous
Then read the producer manuals:http://github.com/madrobby/scriptaculous/wikis/slider-Hidequoted text -
- Show quoted text -
Thanks, but I read those already.

Did you? I am not convinced: because on the linked page setDisabled is
documented as a method that takes no arguments:
"setDisabled (none)   Will set the slider to the disabled state
(disabled = true)"

So:

$('slider').setDisabled()- Hide quoted text -

- Show quoted text -

I did read it but I didn't know how to impliment it, I'm not a
Javascript guy yet so that's why I'm asking the questions. I tried:
onChange:function(v){
onChange(v)
$('slider').setDisabled()
}
But it didn't work.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,141
Messages
2,570,818
Members
47,367
Latest member
mahdiharooniir

Latest Threads

Top