Lukas,<br><br>Thank you.&nbsp; I got it working.&nbsp; I will definitely read further in the documentation.&nbsp; <br><br>Ah, coding in Seaside is like going from painting with blocks of wood to creating a Mona Lisa.&nbsp; Seaside code is pure art.<br>
<br>Chris<br><br><div class="gmail_quote">On Thu, Jun 5, 2008 at 2:05 AM, Lukas Renggli &lt;<a href="mailto:renggli@gmail.com">renggli@gmail.com</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">&gt; I have a marker on the map which houses a link with an onclick handler<br>
&gt; called &#39;addLocation( &quot;123456&quot; );&#39;. &nbsp; So, I tried to define addLocation like<br>
&gt; this:<br>
&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; html script: (&#39; function addLocation( theId ) { &#39;, ((<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;html updater<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; id: &#39;locations&#39;;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; callback: [ :v |<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; locations add: ( myLocation new title: v ).<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; self renderLocationsOn: html.<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;]<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; value: (SUStream on: &#39;theId&#39;)) asJavascript ), &#39;; }&#39;<br>
&gt; ).<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ]<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ]<br>
&gt;<br>
&gt; This crashes my updater. &nbsp;It does pass the value of theId properly as this<br>
&gt; is stored into the MyLocation collection. &nbsp;But, it seems I need an html<br>
&gt; object renderer passed back to me.<br>
<br>
</div>You should not render within #callback:value:. Use a<br>
rendering-callback to update your page.<br>
<br>
Furthermore, pay attention that &#39;html&#39; is not valid anymore (this html<br>
stream has been sent out when the script was generated) when the<br>
callback is triggered. Use the renderer that gets passed into the<br>
render-callback. Slime detects that kind of problems.<br>
<br>
html updater<br>
 &nbsp; id: &#39;locations&#39;;<br>
 &nbsp; callback: [ :v | locations add: v ] value: &#39;something&#39;;<br>
 &nbsp; callback: [ :r | self renderLocationsOn: r ].<br>
<br>
Please check out the class comments in SUAjax and subclasses. Also the<br>
methods #callback:value: and #callback: are heavily documented.<br>
<div><div></div><div class="Wj3C7c"><br>
Cheers,<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>
</div></div></blockquote></div><br>