M
murrayatuptowngallery
I would like to have a slider or mouse position click capture means of
collecting a user input from a scale or ruler-like graphic.
I found some code snippets for mouse position capture on
dynamicdrive.com.
About halfway down the page
http://www.dynamicdrive.com/dynamicindex11/domdrag/
There is a code snippet under the header 'Limiting the range of the
drag"
to create a slider with a defined size.
code below
<div id="thumb" style="position: relative; left:0; top:0;"></div>
<script language="javascript">
var aThumb = document.getElementById("thumb");
Drag.init(aThumb, null, 0, 300, 0, 0);
</script>
I found that with the mouse position code one can scale it with JS
math functions to display the desired range of numbers.
How could a graphic image be positioned to coincide with a restricted
range of slider or mouse position.
Full screen width is fine (probably has to be this way) if using mouse
position and click capture.
I've seen graphics used as slider 'visuals' but they used complicated
systems like dojo I couldn't figure out.
Thanks
Murray
collecting a user input from a scale or ruler-like graphic.
I found some code snippets for mouse position capture on
dynamicdrive.com.
About halfway down the page
http://www.dynamicdrive.com/dynamicindex11/domdrag/
There is a code snippet under the header 'Limiting the range of the
drag"
to create a slider with a defined size.
code below
<div id="thumb" style="position: relative; left:0; top:0;"></div>
<script language="javascript">
var aThumb = document.getElementById("thumb");
Drag.init(aThumb, null, 0, 300, 0, 0);
</script>
I found that with the mouse position code one can scale it with JS
math functions to display the desired range of numbers.
How could a graphic image be positioned to coincide with a restricted
range of slider or mouse position.
Full screen width is fine (probably has to be this way) if using mouse
position and click capture.
I've seen graphics used as slider 'visuals' but they used complicated
systems like dojo I couldn't figure out.
Thanks
Murray