Try <br><br>value: (SUStream on: &#39;alert(&quot;test&quot;)&#39;)<br><br>Gerhard<br><br><div class="gmail_quote">On Tue, Feb 9, 2010 at 12:31 PM, Marco D&#39;Ambros <span dir="ltr">&lt;<a href="mailto:marco.dambros@usi.ch">marco.dambros@usi.ch</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Ok, thanks.<br>
Now, considering the following code snippet:<br>
<br>
(html submitButton)<br>
        onClick: ((html evaluator)<br>
                callback: [:value | self halt.]<br>
                value: &#39;alert(&#39;&#39;test&#39;&#39;);&#39;);<br>
        text: &#39;Submit&#39;<br>
<br>
if I understood correctly, when the button is pressed the javascript is executed and the result of the execution is sent back to the callback block.<br>
However, when I click the button the javascript is not executed, as the Alert(&#39;test&#39;) does not appear.<br>
<br>
Cheers,<br>
<font color="#888888">Marco<br>
</font><div><div></div><div class="h5"><br>
<br>
<br>
On Feb 9, 2010, at 12:17 PM, Lukas Renggli wrote:<br>
<br>
&gt;&gt; I am trying to use<br>
&gt;&gt;<br>
&gt;&gt; SUEvaluator &gt;&gt; callback: value:<br>
&gt;&gt;<br>
&gt;&gt; to do it. The idea was to put the evaluation of the javascript command in the value part and pass its result to the callback. However, I am not sure whether this is the right way to go..<br>
&gt;&gt; Could you give me some suggestion on how to implement this?<br>
&gt;<br>
&gt; That&#39;s definitely the right way. You need to consider that the<br>
&gt; Javascript code that is used to calculate the value should be a<br>
&gt; string, because it will be put into the request URL of the evaluator.<br>
&gt; Have a look at the senders of #callback:value: there are several<br>
&gt; examples where values are concatenated in Javascript and split again<br>
&gt; in Smalltalk.<br>
&gt;<br>
&gt; Lukas<br>
&gt;<br>
&gt; --<br>
&gt; Lukas Renggli<br>
&gt; <a href="http://www.lukas-renggli.ch" target="_blank">http://www.lukas-renggli.ch</a><br>
&gt; _______________________________________________<br>
&gt; seaside mailing list<br>
&gt; <a href="mailto:seaside@lists.squeakfoundation.org">seaside@lists.squeakfoundation.org</a><br>
&gt; <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>
_______________________________________________<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>