Hi Tim,<div>Perhaps you have gone a bit astray...first, I don&#39;t see where you render the myID div, and jQuery of course needs a div with an id in what you are trying to do.</div><div><br></div><div>Here is what I suggest, along the lines of the CTChat example.</div>
<div><br><div class="gmail_quote">On Wed, Aug 11, 2010 at 7:17 PM, Tim Mackinnon <span dir="ltr">&lt;<a href="mailto:tamackinnon@gmail.com" target="_blank">tamackinnon@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">So I was making great progress until I descided to render remove buttons with items in my subcomponent.<br>
<br>
When I initially render my component I have something like this:<br>
<br></blockquote><div><br></div><div>Try breaking this method up so that the rendering of the tokenWaiters is in its own method.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

renderContentOn: html<br>
        (html div)<br></blockquote><div>               id: #waiters;</div><div>              with: [ self renderTokenWaitersOn:html ]</div><div><br></div><div>  renderTokenWaitersOn: html</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

             self contentModel tokenWaitersDo: [ :item | html tableRow: [               i := i + 1.<br>
                html               tableData: [ html text: item name ];<br>
                   tableData: [html button                                                                                              onClick: (html jQuery ajax script: [:s| self removeToken: i]);                                          value: &#39;Remove&#39; ] ] ] ] ] ]<br>


<br>
And I get something in my page like this:<br>
<br>
&lt;button class=&quot;submit&quot; type=&quot;submit&quot; onclick=&quot;$.ajax({&amp;quot;dataType&amp;quot;:&amp;quot;script&amp;quot;,&amp;quot;url&amp;quot;:&amp;quot;/elephant&amp;quot;,&amp;quot;data&amp;quot;:[&amp;quot;_s=6EHJpgKqpOIhEcqM&amp;quot;,&amp;quot;_k=ICZ-_7Df8kBvKt2F&amp;quot;,&amp;quot;3&amp;quot;].join(&amp;quot;&amp;amp;&amp;quot;)})&quot;&gt;Remove&lt;/button&gt;<br>


<br>
When <br>
I click on my remove button - I end up doing something like:<br>
<br>
ajaxReplaceWith: aJSQuery<br>
        ^ (aJSQuery id: myId) replaceWith: [ :r | r render: self ]<br></blockquote><div><br></div><div>Then instead of r render: self put self renderTokenWaitersOn: html and tell jQuery to replace the #waiters id added above.</div>
<div><br></div><div>I could be completely mistaken of course. But that is what I would try.</div><div><br></div><div>John</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<br>
But it generates the following:<br>
<br>
&lt;button class=&quot;submit&quot; type=&quot;submit&quot; onclick=&quot;$.ajax({&amp;quot;dataType&amp;quot;:&amp;quot;script&amp;quot;,&amp;quot;url&amp;quot;:&amp;quot;/&amp;quot;,&amp;quot;data&amp;quot;:&amp;quot;1&amp;quot;})&quot;&gt;Remove&lt;/button&gt;<br>


<br>
I <br>
think I picked up the above fragment from some mal message answer by Lukas - and it was working well, but notice how the url parameter is wrong - its not /element with the k and s paramters???<br>
<br>
Is this because render: is not rendering in the context of a child component? And is there some other way of re-rendering my component by an ajax call? I think Julian had an example in the comet thread - maybe I can get that to work?<br>


<br>
Any help greatly appreciated.<br>
<br>
Tim<br>
<br>
<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>
</blockquote></div><br><br clear="all"><br>-- <br><a href="http://john-mckeon.us/seaside" target="_blank">http://john-mckeon.us/seaside</a><br>
</div>