<div>Hi!</div>
<div>&nbsp;</div>
<div>I made a quick and dirty example!</div>
<div>&nbsp;</div>
<div>HTH</div>
<div>Gerhard</div>
<div>&nbsp;</div>
<div>&nbsp;| formId |<br>&nbsp;formId := html nextId.<br>&nbsp;html form id: formId; <br>&nbsp;&nbsp;with: [html checkbox value: false; callback: [:v | set := v];<br>&nbsp;&nbsp;&nbsp;&nbsp;onClick: (html evaluator triggerForm: formId;</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; callback: [:script | script element id: &#39;text&#39;; update: [:r | set ifTrue: [r text: &#39;My address&#39;]<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ifFalse: [r text: &#39;&#39;]] ]).<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;html textArea id: &#39;text&#39;; with: [html text: &#39;Empty&#39;]].</div>

<div>&nbsp;</div>
<div><br><br>&nbsp;</div>
<div class="gmail_quote">On Sat, Mar 8, 2008 at 4:38 PM, Richard K Eng &lt;<a href="mailto:richard.eng@rogers.com">richard.eng@rogers.com</a>&gt; wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">I&#39;m puzzled how to use #updater. I&#39;m trying to use a checkbox to add text to<br>a textArea input field. For example,...<br>
<br>renderBillingCheckboxAndAddressOn: html<br>&nbsp;html div<br>&nbsp;class: &#39;frow&#39;;<br>&nbsp;with:<br>&nbsp; [html break.<br>&nbsp; html paragraph:<br>&nbsp; &nbsp;[html checkbox<br>&nbsp; &nbsp; value: useShippingAddress;<br>&nbsp; &nbsp; callback: [:value | useShippingAddress := value];<br>
&nbsp; &nbsp; onClick: (html updater id: &#39;shipping&#39;;<br>&nbsp; &nbsp; &nbsp; callback: [:r | useShippingAddress := useShippingAddress not.<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;self renderBillingAddressOn: r] );<br>&nbsp; &nbsp; with: &#39;Use shipping address as billing address also&#39;]].<br>
&nbsp;html div<br>&nbsp;class: &#39;frow&#39;;<br>&nbsp;with:<br>&nbsp; [html span<br>&nbsp; &nbsp;class: &#39;formlabel&#39;;<br>&nbsp; &nbsp;with: [html text: &#39;Billing address&#39;].<br>&nbsp; html span<br>&nbsp; &nbsp;class: &#39;forminput&#39;;<br>&nbsp; &nbsp;with: [self renderBillingAddressOn: html]]<br>
<br><br>This code works, but I&#39;m sure it&#39;s not the right way to do things. The<br>reason I have the &#39;useShippingAddress := useShippingAddress not&#39; nonsense is<br>because without it, I can&#39;t get #useShippingAddress to have the correct<br>
checkbox value in #renderBillingAddressOn:. The problem is,<br>#useShippingAddress only gets the correct checkbox value on form submission,<br>NOT upon invocation of #onClick:.<br><br>Ultimately, what I want is for #onClick: to use whatever value is selected<br>
by the form control, whether the control is a checkbox or radio button or<br>dropdown menu. This *has* to be doable, so the question is: &nbsp;HOW???<br><br>Regards,<br>Richard<br><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>
</blockquote></div><br>