Changed the code to this, and now it works :-<div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>html span class: 'formdata'; with: [html </div><div><span class="Apple-tab-span" style="white-space:pre">                </span>textInput</div>
<div><span class="Apple-tab-span" style="white-space:pre">                </span>id: #tournamentname;</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>value: 'DefaultName';</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>value: tournamentEvent tournamentName;</div>
<div><span class="Apple-tab-span" style="white-space:pre">                </span>callback: [:value | tournamentEvent tournamentName: value];</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>onChange:(html jQuery ajax script: [ :s | s << (s jQuery: #potsize) value: 999])</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>].</div><div><br></div>If I understand this correctly, this is quite powerful. Is s a stream that is opened back to the browser?</div><div><br></div><div><br>
<div class="gmail_quote">On Wed, Feb 11, 2009 at 1:56 PM, John Toohey <span dir="ltr"><<a href="mailto:johnptoohey@gmail.com">johnptoohey@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Changed the code to this :-<div><div class="Ih2E3d"><div><span style="white-space:pre">        </span>html span class: 'formdata'; with: [html </div><div><span style="white-space:pre">                </span>textInput</div>
<div><span style="white-space:pre">                </span>id: #tournamentname;</div><div><span style="white-space:pre">                </span>value: tournamentEvent tournamentName;</div><div><span style="white-space:pre">                </span>callback: [:value | tournamentEvent tournamentName: value];</div>
</div><div><span style="white-space:pre">                </span>onChange: ((html jQuery: #potsize) load html: [:h | h render: 999 ])].</div><div><br></div><div>Now I'm just trying to change the default value of #potsize to 999, and I can see the initial request being sent to the server, but nothing is updated on the client. </div>
<div><br></div><div>I tried to load the Slime package from your site, but received a lot of errors from my Pharo image. I can run the Slime tests that are included with Seaside 2.9 successfully, but can't see how to run Slime on my own code. </div>
<div><br></div><div>Any help is really appreciated.</div><div><br></div><div>Thanks.</div><div><div></div><div class="Wj3C7c"><br><div class="gmail_quote">On Tue, Feb 10, 2009 at 4:09 PM, Lukas Renggli <span dir="ltr"><<a href="mailto:renggli@gmail.com" target="_blank">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"><div>> - How do I use Slime with my Code? Using the latest Pharo image, and have<br>
> found the Slime classes, but not sure how to use them.<br>
<br>
</div><a href="http://www.lukas-renggli.ch/blog/slime" target="_blank">http://www.lukas-renggli.ch/blog/slime</a><br>
<div><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: [self test:<br>
> 1 on: r]] )].<br>
<br>
</div>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>
<div><div></div><div><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" target="_blank">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></div></div>-- <br>-JT<br><br><br>
</div>
</blockquote></div><br><br clear="all"><br>-- <br>-JT<br><br><br>
</div>