DHTMLX Docs & Samples Explorer

### Event Handling

Slider value is 0
Source

    <script>window.dhx_globalImgPath = "../../codebase/imgs/";</script>
    <script  src="../../codebase/dhtmlxcommon.js"></script>
    <script  src="../../codebase/dhtmlxslider.js"></script>
    <script  src="../../codebase/ext/dhtmlxslider_start.js"></script>
    <link rel="STYLESHEET" type="text/css" href="../../codebase/dhtmlxslider.css">

    <br/>
    <script>function handler(pos, slider) {
        document.getElementById("a1").innerHTML = "Slider value is " + pos;
    }
    var slider = new dhtmlxSlider(null, 500);
    slider.attachEvent("onChange", handler);
    slider.init();</script>
    <br/>
    <div id="a1">Slider value is 0</div>
    <br/><br/><br/>