dhtmlxSlider Events suite (No 3935 )


I use the event onSlideEnd instead of onChange because I want to know the value when the user leave the slider

slider1.attachEvent(“onSlideEnd”,function(newValue,sliderObj){ alert("New values is "+newValue); });

It’s work very well!

But when I click on the slider there’s nothing.

I added

slider1.attachEvent(“onChange”,function(newValue,sliderObj){ alert("New values is "+newValue); });

It’s work when I click but when I use slide I have many alert().

What can I do?

Thanks in advance

This is expected behavior.
onSlideEnd event occurs only when slider button was draged and released.
onChange event occurs each time when state of slider changed

You can use next code to ignore onChange call during slide drag

if (this._busy) return; //ignore calls during drag
… your code here …

Thank you!

It’s perfect!