[Seaside] JQuery UI slider updates textfied and textfield updates
slider: how to?
Lawson English
lenglish5 at cox.net
Sun Aug 29 17:28:23 UTC 2010
Thanks guys. This is a fun system, but the subtleties are, well, subtle.
Lawson
On 8/28/10 3:31 PM, Julian Fitzell wrote:
> On Sat, Aug 28, 2010 at 6:43 PM, Lawson English<lenglish5 at cox.net> wrote:
>> On 8/27/10 3:19 AM, Lukas Renggli wrote:
>>>
>>> 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)
>> [...]
>>
>> I'm not quite getting the syntax. Not sure how the line you gave me fits in
>> with the rest (or what it does, for that matter).
>> [...]
>>
> 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
>
More information about the seaside
mailing list