1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
|
<script type="text/javascript">
{literal}
dojo.require("dijit.form.Slider");
var maxMove ;
var containerTexte;
function containertexteScrollHeight(value)
{
maxMove = dojo.byId("containerTexte").scrollHeight;
var vertical = dojo.byId("myScroll");
var rulesNode = document.createElement('div');
vertical.appendChild(rulesNode);
var sliderRules = new dijit.form.VerticalRule({
count: 0,
style: "width:10px;"
},
rulesNode);
var slider = new dijit.form.VerticalSlider({
name: "vertical",
value: 0,
showButtons : true,
minimum: maxMove-512,
maximum: 0,
intermediateChanges: true,
style: "height:512px;",
onChange: function(value) {
containerTexte.scrollTop= value;
console.log(maxMove+' '+dojo.byId("containerTexte").scrollHeight);
}
},
vertical);
}
dojo.addOnLoad(
function() {
containerTexte = dojo.byId("containerTexte");
}
);
{/literal}
</script> |
Partager