[Seaside] JQuery UI slider updates textfied and textfield updates
slider: how to?
radoslav hodnicak
rh at 4096.sk
Mon Aug 30 13:20:26 UTC 2010
you are referencing DOM id label1, but not creating any DOM element with
that id. you want
html textInput id: label1, value: ...
On Mon, Aug 30, 2010 at 3:10 PM, Lawson English <lenglish5 at cox.net> wrote:
> 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
>>
>>
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20100830/924a6a83/attachment.htm
More information about the seaside
mailing list