<div>Well, if you want to re-render the page, you can just send beSubmitOnChange to the select tag.</div>
<div> </div>
<div> </div>
<div class="gmail_quote">On Thu, Oct 13, 2011 at 11:44 AM, squeakman <span dir="ltr">&lt;<a href="mailto:squeakman@gmail.com">squeakman@gmail.com</a>&gt;</span> wrote:<br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">Thanks Bob and John,<br><br>I have done as you suggested and it does work.<br><br>Here is what the my code now looks like:<br>
<br>(html select)<br> id: &#39;stocksList&#39;;<br> list: self listOfStocks;<br><br> &quot; Ajax Callback 1 &quot;<br> onChange: (html scriptaculous request<br>    triggerForm: (html scriptaculous element up: &#39;form&#39;));<br>
<br> &quot;Ajax Callback 2&quot;<br> onChange: (html scriptaculous evaluator callback: [:s | s refresh]);<br><br> &quot;non Ajax Callback &quot;<br> callback: [:selStock | self selectedStock: selStock]<br><br><br>If I understand things correctly, on change causes &quot;Ajax Callback 1&quot; to be called which causes &quot;non Ajax Callback&quot; to be called where the selected stock is updated.<br>
<br>This works but I also want to re-render the page without having to use a Submit button. I thought that the &quot;non Ajax Callback&quot; would have caused the entire page to be re-rendered but that does not happen.<br>
<br>The &quot;Ajax Callback 2&quot; forces the re-rendering of the page.<br><br>One last question to wrap this up: &quot;Is this the prescribed way to do this task?&quot;.<br><br>Thank you very much,<br>Frank<br><br><br><br>
<br><br>On 13/10/2011 10:40 AM, John McKeon wrote:<br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">I would add that to get the callback to occur via AJAX add:<br>onChange: (html jQuery ajax serializeThisWithHidden)<br>
And in an attempt to make it clearer:<br>The parameter in the list: message is a collection of *objects* and the<br>callback :value will be the selected object. If you give it a collection<br>of string representations of your Stock objects, you will get back the<br>
selected string representation. But if you give it a collection of<br>Stocks in this case, you will get back the selected Stock object.<br>Seaside handles the bookwork for you in determining which object in the<br>collection was selected. You don&#39;t need to deal with the selected index<br>
if you don&#39;t want to.<br><br>On Thu, Oct 13, 2011 at 10:16 AM, Bob Arning &lt;<a href="mailto:arning@charm.net" target="_blank">arning@charm.net</a><br>&lt;mailto:<a href="mailto:arning@charm.net" target="_blank">arning@charm.net</a>&gt;&gt; wrote:<br>
<br>   We had a very similar question on 28-29 Sept (see &quot;Using the select<br>   tag&quot;). The end result was something like:<br><br>   (html select)<br>        list: self genders;<br>        selected: self contact gender;<br>
        enabled: [:ea | ea notNil];<br>        labels: [:ea | ea ifNil: [&#39;---&#39;] ifNotNil: [ea printableVersion]];<br>        callback: [:value | self contact gender: value].<br><br>   Cheers,<br>   Bob<br><br><br>
</blockquote><br>______________________________<u></u>_________________<br>seaside mailing list<br><a href="mailto:seaside@lists.squeakfoundation.org" target="_blank">seaside@lists.<u></u>squeakfoundation.org</a><br><a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http://lists.squeakfoundation.<u></u>org/cgi-bin/mailman/listinfo/<u></u>seaside</a><br>
</blockquote></div><br>