[Seaside] JQuery Slider
Timothy James Ziebart
timothy at churchmilitant.org
Thu May 20 02:52:33 UTC 2010
Thanks John and Lukas, the following works:
html strong: 'Min: '.
html textInput id: #pricemin; size: 8; value: model priceMin
greaseString.
html strong: 'Max: '.
html textInput id: #pricemax; size: 8; value: model priceMax
greaseString.
html div script: (html jQuery new slider
range: true;
step: 50000;
min: 0;
max: 5000000;
values: prices;
orientation: 'horizontal';
onSlide: (html jQuery ajax
callback: [:value | |var|
var := value findTokens: ','.
model priceMax: (var at: 2) asNumber.
model priceMin: (var at: 1) asNumber.
]
value:(html jQuery this slider option: 'values');
script:[ :script |
script << ((html jQuery: #pricemax) value: model
priceMax greaseString).
script << ((html jQuery: #pricemin) value: model
priceMin greaseString)]))].
On 10-05-19 06:28 PM, John Toohey wrote:
> The return from the ajax call is a jQuery script that will update the
> DOM, and the browser does the rendering.
>
> I use it like this :-
>
> html span id: #delay; class:'text'; with: 'Delay : ', self delay
> greaseString.
> html div
> script: (html jQuery new slider
> value: self delay;
> min: 0;
> max: 30;
> onChange: (html jQuery ajax
> callback: [:value | self delay: value asNumber]
> value: (html jQuery this slider getValue);
> script: [:s | s << ((html jQuery: #delay) html: 'Delay : ', self delay
> greaseString )]))
>
> On Wed, May 19, 2010 at 17:41, Timothy James Ziebart
> <timothy at churchmilitant.org <mailto:timothy at churchmilitant.org>> wrote:
>
> Thanks Lukas,
>
> I understand the updating of the values but the rendering is what
> is getting me. How can I update screen to display the values as
> they are changing? Or am I missing something?
>
>
> On 10-05-19 02:15 PM, Lukas Renggli wrote:
>
> What about adding something along the following lines to your
> AJAX call:
>
> script: [ :script |
> script add: (script jQuery id: 'pricemax'; value: model
> priceMax).
> script add: (script jQuery id: 'pricemin'; value: model
> priceMin) ]
>
> Lukas
>
> On 19 May 2010 22:44, Timothy James
> Ziebart<timothy at churchmilitant.org
> <mailto:timothy at churchmilitant.org>> wrote:
>
> Hi all, looking for some suggestions. I have implemented
> the following
> slider:
>
> html div id: 'o_left';
> with:[
>
>
> html textInput id: 'pricemax'.
> html textInput id: 'pricemin'.
>
> html div script: (html jQuery new slider
> range: true;
> step: 50000;
> min: 0;
> max: 5000000;
> values: prices;
> orientation: 'horizontal';
> onSlide: (html jQuery ajax
> callback: [:value | |var|
> var := value findTokens: ','.
> model priceMax: (var at: 2) asNumber.
> model priceMin: (var at: 1) asNumber.
> ]
> value:(html jQuery this slider option:
> 'values')))].
>
> The slider has two handles and with the above code does
> update the priceMax
> and priceMin successfully. Where I am having troubles is
> how to implement
> the updating of the two html text inputs while sliding.
> I am still trying
> to get a better understanding of JQuery and its
> implementation in Seaside
> 3.0.
>
> Thank you for the help.
>
> Tim
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> <mailto:seaside at lists.squeakfoundation.org>
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>
>
>
>
>
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> <mailto:seaside at lists.squeakfoundation.org>
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>
>
>
> --
> -JT
>
>
>
> _______________________________________________
> 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/20100519/71a220c4/attachment-0001.htm
More information about the seaside
mailing list