Wow. So simple when you know what you&#39;re doing.<div><br></div><div>It didn&#39;t occur to me that I could keep sending messages to the same JQAjax object.</div><div><br></div><div>Thanks.</div><div>TF<br><br><div class="gmail_quote">
On Sun, Nov 14, 2010 at 10:03 AM, Nick Ager <span dir="ltr">&lt;<a href="mailto:nick.ager@gmail.com">nick.ager@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;">
Hi<br><br><div class="gmail_quote"><div class="im"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>I want to, using AJAX, when the user selects a value from a list, pass that value to the server for processing and in response change the value of an item on the screen based on some server-side processing.</div>


<div><br></div><div>I expected to be able to do this in a single transaction with the server, but I have been unable to find a way to do so.</div><div><br></div><div>
anAjax&gt;&gt;#serializeThis allows me to pass the selected value to the server, and anAjax&gt;&gt;#script: allows me to change the screen component value. I can&#39;t figure out how to combine this into a single server request. I don&#39;t seem to have access to an Ajax canvas object in the callback when I use serializeThis.</div>

</blockquote><div><br></div></div><div>you could try something like this:</div><div><br></div><div><span style="font-family:arial, sans-serif;font-size:13px;border-collapse:collapse"><div><span style="border-collapse:separate;font-size:small"><font face="&#39;courier new&#39;, monospace"><span style="border-collapse:collapse;white-space:pre-wrap">
        | val |

        html div id: &#39;txt&#39;; with: &#39;&#39;.
        html break.
        html select
                list: { 1. 2. 3. };
                selected: 2;
                
                &quot;Pass the selection back to the server and save it.&quot;
                onChange: ((html jQuery ajax script: [ :s | s &lt;&lt; (s jQuery: &#39;#txt&#39;) text: (val - 1) ]) serializeThis);                
                callback: [ :v |  val := v ]</span></font></span></div></span></div><div><br></div><font color="#888888"><div><br></div><div>Nick</div></font></div>
<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></blockquote></div><br></div>