[Seaside] JQuery UI slider updates textfied and textfield updates slider: how to?

Lukas Renggli renggli at gmail.com
Fri Aug 27 10:19:12 UTC 2010

On 27 August 2010 11:34, Lawson English <lenglish5 at cox.net> wrote:
>  I'm trying to connect the display of slider values to text input sorta like
> the demos on the JQueryUI site, but I can't get the connection to go both
> ways. Changing the value in the text field and pressing return will reset
> the slider position, but changing the slider position doesn't update the
> text field.

You don't tell it to update the text field.

> MyTestSlider>>renderContentOn: html
>    self renderExplanationOn: html.
> html form: [
>          html text: 'slider value here: '.
>      html textInput
>         value: self current;
>    callback: [ :value | self current: value ].
>   html div script: (html jQuery new slider
>      value: self current;
>      onStop: (html jQuery ajax
>  callback: [ :value | self current: value asNumber ]
> value: (html jQuery this slider getValue))

Try to add something along the following lines to your onStop: event:

   , ((html jQuery id: 'id-of-your-textfield) value: html jQuery this
slider getValue)


Lukas Renggli

More information about the seaside mailing list