Forum: Ruby on Rails implementing a Slider control

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Srinivas M. (Guest)
on 2006-04-25 00:19
i'm trying to implement a slider like
"http://wiki.script.aculo.us/scriptaculous/show/Sli..., 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>
Ben R. (Guest)
on 2006-04-25 01:53
(Received via mailing list)
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 <removed_email_address@domain.invalid> wrote:
>
>
> </div>
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> Rails mailing list
> removed_email_address@domain.invalid
> http://lists.rubyonrails.org/mailman/listinfo/rails
>


--
Ben R.
http://www.benr75.com
This topic is locked and can not be replied to.