By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,442 Members | 1,319 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,442 IT Pros & Developers. It's quick & easy.

disable slider onchange

P: n/a
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
Jun 27 '08 #1
Share this Question
Share on Google+
6 Replies


P: n/a
VK
On May 24, 9:58 pm, cmgmyr <cmg...@gmail.comwrote:
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?
Jun 27 '08 #2

P: n/a
On May 24, 5:06*pm, VK <schools_r...@yahoo.comwrote:
On May 24, 9:58 pm, cmgmyr <cmg...@gmail.comwrote:


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
Jun 27 '08 #3

P: n/a
VK
On May 25, 5:58 pm, cmgmyr <cmg...@gmail.comwrote:
On May 24, 5:06 pm, VK <schools_r...@yahoo.comwrote:
On May 24, 9:58 pm, cmgmyr <cmg...@gmail.comwrote:
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
Jun 27 '08 #4

P: n/a
On May 25, 10:54*am, VK <schools_r...@yahoo.comwrote:
On May 25, 5:58 pm, cmgmyr <cmg...@gmail.comwrote:


On May 24, 5:06 pm, VK <schools_r...@yahoo.comwrote:
On May 24, 9:58 pm, cmgmyr <cmg...@gmail.comwrote:
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.
Jun 27 '08 #5

P: n/a
VK
On May 25, 7:03 pm, cmgmyr <cmg...@gmail.comwrote:
On May 25, 10:54 am, VK <schools_r...@yahoo.comwrote:
On May 25, 5:58 pm, cmgmyr <cmg...@gmail.comwrote:
On May 24, 5:06 pm, VK <schools_r...@yahoo.comwrote:
On May 24, 9:58 pm, cmgmyr <cmg...@gmail.comwrote:
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/scriptacu...is/slider-Hide quoted 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()

Jun 27 '08 #6

P: n/a
On May 25, 11:23*am, VK <schools_r...@yahoo.comwrote:
On May 25, 7:03 pm, cmgmyr <cmg...@gmail.comwrote:


On May 25, 10:54 am, VK <schools_r...@yahoo.comwrote:
On May 25, 5:58 pm, cmgmyr <cmg...@gmail.comwrote:
On May 24, 5:06 pm, VK <schools_r...@yahoo.comwrote:
On May 24, 9:58 pm, cmgmyr <cmg...@gmail.comwrote:
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/scriptacu...der-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.
Jun 27 '08 #7

This discussion thread is closed

Replies have been disabled for this discussion.