Setting current value on slider

When I enter the value=“10” in the html the slider button does not display. The linked box shows the value of 10. If I click anywhere along the slider the button appears.

If the range of the slider is 0 - 1 million and I set the value as 100000 then in the element style on the runner div the left amount is set to 284849px - way off the scale. When the slider button is visible the left amount is between 1 and 283px.

Hi

could you please attach your code here and what version of component is used?

dhtmlxSlider v.4.0.3 Standard edition

HTML


Initialization

function doOnLoad(){
mySlider = new dhtmlXSlider({
parent: “sliderObj”,
linkTo: “sliderLink”
});
mySlider.setMax(1000000); // rightmost position
mySlider.setStep(10000);

I then initialize 5 more sliders


This is what Firebug shows in Firefox for the element that is generated:-

This is the CSS

element.style {
left: 1424240px;
top: -5px;
}
.dhtmlxslider_dhx_skyblue .dhxsl_runner {
background: linear-gradient(#f1f7ff, #e2efff) repeat scroll 0 0 rgba(0, 0, 0, 0);
border: 1px solid #a4bed4;
border-radius: 2px;
height: 16px;
margin: 0;
overflow: hidden;
padding: 0;
position: absolute;
width: 16px;
}

If I remove the Value=“500000” the element looks like this

element.style {
left: 142px;
top: -5px;
}
.dhtmlxslider_dhx_skyblue .dhxsl_runner {
background: linear-gradient(#f1f7ff, #e2efff) repeat scroll 0 0 rgba(0, 0, 0, 0);
border: 1px solid #a4bed4;
border-radius: 2px;
height: 16px;
margin: 0;
overflow: hidden;
padding: 0;
position: absolute;
width: 16px;
}

The box Sliderlink shows the correct value of 500,000

I’ve worked it out. If you specify a value within the then you have to supply the min, max and step as well.

Hi

slider do not have overflow check on startup, i.e. value was bigger than max value. will fixed in a future version