slider pointer value into a variable?

geoffcox
Sat, 26 Jan 2008 14:14:49 -0000

Hello,

I am new to all this but would like to put the changing value of the
pointer into a variable - how do I do this? The snippet of code below
works ...

Thanks

Geoff


Standard horizontal slider
  <div id="track1"
style="width:200px;background-color:#aaa;height:
5px;">
    <div id="handle1" style="width:5px;height:10px;background-
color:#f00;cursor:move;">

  <div id="debug1" style="padding-top:
5px;">


Slider with predefined values
[1,2,3,4,5,6,7,8,9,10]</
strong>
  <div id="track3"
style="width:200px;background-color:#aaa;height:
5px;">
    <div id="handle3" style="width:5px;height:10px;background-
color:#f00;cursor:move;">

  <div id="debug3" style="padding-top:
5px;">





  <script type="text/javascript"
language="javascript">
//
    new Control.Slider(''track1'',''handle1'',{

onSlide:function(v){$(''debug1'').innerHTML=''slide:
''+v},

onChange:function(v){$(''debug1'').innerHTML=''changed!
''+v}});

    new
Control.Slider(''handle3'',''track3'',{range:$R(1,10),
        values:[1,2,3,4,5,6,7,8,9,10],

onSlide:function(v){$(''debug3'').innerHTML=''slide:
''+v},

onChange:function(v){$(''debug3'').innerHTML=''changed!
''+v}});
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Spinoffs" group.
To post to this group, send email to
rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---