Got it. Thanks again for your patience and help. I'm starting to really get my head around the JQuery support now, great addition to an already superb web framework.<div><br><br><div class="gmail_quote">On Wed, Feb 11, 2009 at 4:07 PM, Lukas Renggli <span dir="ltr"><<a href="mailto:renggli@gmail.com">renggli@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">#load only replaces HTML Dom nodes.<br>
<br>
#ajax and #script: allows you to just change the value of the form<br>
field by using #value:, which is in your case probably preferable<br>
because the callback of the form element is not recreated.<br>
<font color="#888888"><br>
Lukas<br>
</font><div><div></div><div class="Wj3C7c"><br>
On Wed, Feb 11, 2009 at 9:58 PM, John Toohey <<a href="mailto:johnptoohey@gmail.com">johnptoohey@gmail.com</a>> wrote:<br>
> Great screencast, thanks.<br>
> Does #load set the value of the DOM element, and is it preferable to use the<br>
> #script for updating a form?<br>
><br>
> On Wed, Feb 11, 2009 at 3:21 PM, Lukas Renggli <<a href="mailto:renggli@gmail.com">renggli@gmail.com</a>> wrote:<br>
>><br>
>> > Changed the code to this :-<br>
>> > html span class: 'formdata'; with: [html<br>
>> > textInput<br>
>> > id: #tournamentname;<br>
>> > value: tournamentEvent tournamentName;<br>
>> > callback: [:value | tournamentEvent tournamentName: value];<br>
>> > onChange: ((html jQuery: #potsize) load html: [:h | h render: 999 ])].<br>
>> > Now I'm just trying to change the default value of #potsize to 999, and<br>
>> > I<br>
>> > can see the initial request being sent to the server, but nothing is<br>
>> > updated<br>
>> > on the client.<br>
>><br>
>> I removed all the noise around it, and it works for me:<br>
>><br>
>> html span id: 'potsize'.<br>
>> html textInput<br>
>> onChange: ((html jQuery: #potsize) load<br>
>> html: [:h | h render: 999 ])<br>
>><br>
>> > I tried to load the Slime package from your site, but received a lot of<br>
>> > errors from my Pharo image. I can run the Slime tests that are included<br>
>> > with<br>
>> > Seaside 2.9 successfully, but can't see how to run Slime on my own code.<br>
>><br>
>> I show how to run any of the refactoring tools on a particular set of<br>
>> methods only in the screen-cast here:<br>
>><br>
>> <a href="http://www.lukas-renggli.ch/blog/ob-rb-3" target="_blank">http://www.lukas-renggli.ch/blog/ob-rb-3</a><br>
>><br>
>> Lukas<br>
>><br>
>> > Any help is really appreciated.<br>
>> > Thanks.<br>
>> > On Tue, Feb 10, 2009 at 4:09 PM, Lukas Renggli <<a href="mailto:renggli@gmail.com">renggli@gmail.com</a>><br>
>> > wrote:<br>
>> >><br>
>> >> > - How do I use Slime with my Code? Using the latest Pharo image, and<br>
>> >> > have<br>
>> >> > found the Slime classes, but not sure how to use them.<br>
>> >><br>
>> >> <a href="http://www.lukas-renggli.ch/blog/slime" target="_blank">http://www.lukas-renggli.ch/blog/slime</a><br>
>> >><br>
>> >> > - Tried this :-<br>
>> >> > html span class: 'formdata'; with: [html<br>
>> >> > textInput<br>
>> >> > id: #tournamentname;<br>
>> >> > value: tournamentEvent tournamentName;<br>
>> >> > callback: [:value | tournamentEvent tournamentName: value];<br>
>> >> > onChange: (html jQuery ajax serializeThis; html: [:r | r render:<br>
>> >> > [self<br>
>> >> > test:<br>
>> >> > 1 on: r]] )].<br>
>> >><br>
>> >> You need to specify somewhere what element to change, right?<br>
>> >><br>
>> >> - You can either do that by sending back a javascript that does the<br>
>> >> update of the particular element. In this case you would replace<br>
>> >> "html: [ :r | .. ]" with something like "script: [ :s | s << (s<br>
>> >> jQuery: '.someid') html: DateAndTime now ]". This is very powerful,<br>
>> >> but also a bit complicated.<br>
>> >><br>
>> >> - Or (and this is probably what you want) you can use the ajax-loader<br>
>> >> on the particular DOM node. So just replace "html jQuery ajax" with<br>
>> >> "(html jQuery: '.someid') load".<br>
>> >><br>
>> >> Lukas<br>
>> >><br>
>> >> --<br>
>> >> Lukas Renggli<br>
>> >> <a href="http://www.lukas-renggli.ch" target="_blank">http://www.lukas-renggli.ch</a><br>
>> >> _______________________________________________<br>
>> >> seaside mailing list<br>
>> >> <a href="mailto:seaside@lists.squeakfoundation.org">seaside@lists.squeakfoundation.org</a><br>
>> >> <a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br>
>> ><br>
>> ><br>
>> ><br>
>> > --<br>
>> > -JT<br>
>> ><br>
>> ><br>
>> ><br>
>> > _______________________________________________<br>
>> > seaside mailing list<br>
>> > <a href="mailto:seaside@lists.squeakfoundation.org">seaside@lists.squeakfoundation.org</a><br>
>> > <a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br>
>> ><br>
>> ><br>
>><br>
>><br>
>><br>
>> --<br>
>> Lukas Renggli<br>
>> <a href="http://www.lukas-renggli.ch" target="_blank">http://www.lukas-renggli.ch</a><br>
>> _______________________________________________<br>
>> seaside mailing list<br>
>> <a href="mailto:seaside@lists.squeakfoundation.org">seaside@lists.squeakfoundation.org</a><br>
>> <a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br>
><br>
><br>
><br>
> --<br>
> -JT<br>
><br>
><br>
><br>
> _______________________________________________<br>
> seaside mailing list<br>
> <a href="mailto:seaside@lists.squeakfoundation.org">seaside@lists.squeakfoundation.org</a><br>
> <a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br>
><br>
><br>
<br>
<br>
<br>
--<br>
Lukas Renggli<br>
<a href="http://www.lukas-renggli.ch" target="_blank">http://www.lukas-renggli.ch</a><br>
_______________________________________________<br>
seaside mailing list<br>
<a href="mailto:seaside@lists.squeakfoundation.org">seaside@lists.squeakfoundation.org</a><br>
<a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>-JT<br><br><br>
</div>