searching for Scrollbar extension / js code

Hey everybody!

I am looking for a way to substitute an int input field in a form with a scrollable box.

I am out for words atm so maybe I am not as descriptive as I could. I have already searched google but I can’t seem to find anything (I only get gallery scrollers). I definitely would settle with some rudimentary js that I can build uppon. Ofcourse an already complete extension is welcome :slight_smile:

Any ideas?

I am sure somebody has done it already.

EDIT:

I so love it when I find the answer to my questions 30 seconds after I post…

I think this site has the answers to my problems. I’ll tinker with it for a while and report back.

Seems to happen a lot to me too. :)

This is just for refference:

What I ended up doing is:

-use the jui class which has the jquery slide plugin wraped.

-as seen in the code example I use the widget’s slide param to feed data back to my input

-also note that since you can pass htmlParams in CHtml::textField you easily can create a feedback loop to the slider as demonstarted below.




<?php echo $form->textField($model,'value', array(

         'onkeyup' => '$(\'#Lookup_value_slider\').slider(\'value\', this.value)' ,

      )); 

      $this->widget('zii.widgets.jui.CJuiSlider', array(

         'value'=>isset($model->value)?$model->value:0,

         'id'    =>'Lookup_value_slider',

         // additional javascript options for the slider plugin

         'options'=>array(

            'min'=>0,

            'max'=>255,

            'slide'=>'js:function(event, ui) { $("#Lookup_value").val(ui.value);}'

         ),

         'htmlOptions'=>array(

            'style'=>'width:400px;',

          ),

       ));

?>




Conclusion: Search better, be smarter, have a life :P