Hi.<div><br></div><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><meta http-equiv="content-type" content="text/html; charset=utf-8"><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>
<div><br></div><div>I hope I&#39;m missing something simple.</div><div><br></div><div>Here is the toy test case I have been using:</div><div><br></div><div><div>enderContentOn: html</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre"><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">        </font></span><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">| val |</font></div>
<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace"><br></font></div><div><span class="Apple-tab-span" style="white-space:pre"><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">        </font></span><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">html div id: &#39;txt&#39;; with: &#39;&#39;.</font></div>
<div><span class="Apple-tab-span" style="white-space:pre"><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">        </font></span><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">html break.</font></div>
<div><span class="Apple-tab-span" style="white-space:pre"><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">        </font></span><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">html select</font></div>
<div><span class="Apple-tab-span" style="white-space:pre"><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">                </font></span><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">list: { 1. 2. 3. };</font></div>
<div><span class="Apple-tab-span" style="white-space:pre"><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">                </font></span><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">selected: 2;</font></div>
<div><span class="Apple-tab-span" style="white-space:pre"><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">                </font></span></div><div><span class="Apple-tab-span" style="white-space:pre"><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">                </font></span><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">&quot;Pass the selection back to the server and save it.&quot;</font></div>
<div><span class="Apple-tab-span" style="white-space:pre"><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">                </font></span><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">onChange: (html jQuery ajax serializeThis);</font><span class="Apple-tab-span" style="white-space:pre"><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">                </font></span></div>
<div><span class="Apple-tab-span" style="white-space:pre"><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">                </font></span><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">callback: [ :v |  val := v ];</font></div>
<div><span class="Apple-tab-span" style="white-space:pre"><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">                </font></span></div><div><span class="Apple-tab-span" style="white-space:pre"><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">                </font></span><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">&quot;Set the div text to one less than the saved value&quot;</font></div>
<div><span class="Apple-tab-span" style="white-space:pre"><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">                </font></span><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">onChange: (html jQuery ajax script: [ :s | s &lt;&lt; (s jQuery: &#39;#txt&#39;) text: (val - 1) ])</font></div>
</div>