[Seaside] JQuery UI slider updates textfied and textfield updates
slider: how to?
Lawson English
lenglish5 at cox.net
Mon Aug 30 13:10:39 UTC 2010
Still not getting it, sorry. This still doesn't seem to do what I want:
renderContentOn: html
| label1 |
self renderExplanationOn: html.
html form:
[
html text: 'slider value here: '.
label1 := html nextId.
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)),
((html jQuery id: label1)
value: html jQuery this slider getValue))
]
On 8/28/10 3:31 PM, Julian Fitzell wrote:
>
> The added code generates JS that gets the text field by id ("html
> jQuery id: 'id-of-your-textfield'") and sets its value ("value:") to
> the value of the slider ("html jQuery this slider getValue"). Lukas is
> suggesting that you need to this as well as sending the value back to
> the smalltalk image. You can combine two JS actions using a comma so:
>
> 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)) ,
> ((html jQuery id: 'id-of-your-textfield)
> value: html jQuery this slider getValue))
>
> Julian
>
More information about the seaside
mailing list