i''m trying to implement a slider like "wiki.script.aculo.us/scriptaculous/show/SliderDemo", but i see that my code doesnt work. i seem to do everything correct but then if some one could look into it and help.. regards muddana The View Code: <%= javascript_include_tag "prototype", "effects" ,"dragdrop","application","controls" ,"scriptaculous","global","slider" %> <html> <script type="text/javascript" language="javascript"> var s2 = new Control.Slider(''handle1'',''track1'', {axis:''horizontal'',increment: 1, minimum: 0, maximum:100,disabled: false}); s2.options.onChange = function(value){ $(''debug1'').innerHTML = value; }; s2.options.onSlide = function(value){ $(''debug1'').innerHTML = "slide"; }; </script> <body> <div id="image"> <%= image_tag("/picture/filename/1/scaler_1.jpg") %> </div> <p><strong>Standard horizontal slider</strong> <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> </div> <div id="debug1" style="padding-top: 5px;"></div></p> </body> </html> -- Posted via ruby-forum.com.
Hi Muddana ~ That is a lot of source to look at without context. Are you getting javascript errors? If your not already, I would recommend debugging the page with Firefox''s JavaScript console. ~ Ben On 4/24/06, srinivas muddana <srinivas.muddana@gmail.com> wrote:> i''m trying to implement a slider like > "wiki.script.aculo.us/scriptaculous/show/SliderDemo", but i see > that my code doesnt work. > i seem to do everything correct but then if some one could look into it > and help.. > > regards > muddana > > The View Code: > > > > <%= javascript_include_tag "prototype", "effects" > ,"dragdrop","application","controls" ,"scriptaculous","global","slider" > %> > <html> > <script type="text/javascript" language="javascript"> > var s2 = new Control.Slider(''handle1'',''track1'', > {axis:''horizontal'',increment: 1, minimum: 0, maximum:100,disabled: > false}); > > s2.options.onChange = function(value){ > $(''debug1'').innerHTML = value; > }; > s2.options.onSlide = function(value){ > $(''debug1'').innerHTML = "slide"; > }; > </script> > <body> > <div id="image"> > <%= image_tag("/picture/filename/1/scaler_1.jpg") %> > </div> > <p><strong>Standard horizontal slider</strong> > <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> > </div> > <div id="debug1" style="padding-top: 5px;"></div></p> > </body> > </html> > > -- > Posted via ruby-forum.com. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > lists.rubyonrails.org/mailman/listinfo/rails >-- Ben Reubenstein benr75.com