Heya,
Please post questions on prototype/scriptaculous to the rails-
spinoffs mailing list,
see http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs for
more info.
You can also use the ruby-forum.com gateway at:
http://www.ruby-forum.com/forum/10
Cheers,
Thomas
Am 20.05.2006 um 09:41 schrieb Wiley Jacobs:
> I can''t figure out how to take that value that the user has chosen
in
> the slider and put that into a form value. Does anybody know how to do
> this?
>
> Here is my code so far (It''s pretty much directly from
> script.aculo.us):
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
> <html>
> <head>
> <title>Text effects tests</title>
> <script type="text/javascript"
src="js/prototype.js"></script>
> <script type="text/javascript"
src="js/scriptaculous.js"></script>
> </script>
> </head>
> <body>
> <h1>Sliders</h1>
> <h2>Slider with predefined values [2,4,6,8] and a non-default range
> [2,15]</h2>
> <form name="myform">
> <input name="test" value="helloworld">
> <div id="track3"
style="width:200px;background-color:#aaa;height:
> 5px;">
> <div id="handle3"
> style="width:5px;height:10px;background-color:#f00;">
</div>
> </div>
> <p id="debug3"> </p>
> <a href="#"
onClick="javascript:submit()">Submit</a>
> </form>
> <script type="text/javascript">
> var v;
> // <![CDATA[
> new
>
Control.Slider(''handle3'',''track3'',{sliderValue:20,range:$R(1,100),
>
onSlide:function(v){$(''debug3'').innerHTML=''Percentage:
> ''+Math.round(v)},
>
onChange:function(v){$(''debug3'').innerHTML=''Percentage:
> ''+Math.round(v)}});
> // ]]>
> </script>
> </body>
> </html>
>
> Any help would be appreciated!
>
> Wiley
>
> --
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> Rails mailing list
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
--
Thomas Fuchs
wollzelle
http://www.wollzelle.com
http://www.fluxiom.com :: online digital asset management
http://script.aculo.us :: Web 2.0 JavaScript
http://mir.aculo.us :: Where no web developer has gone before