Try <br><br>value: (SUStream on: 'alert("test")')<br><br>Gerhard<br><br><div class="gmail_quote">On Tue, Feb 9, 2010 at 12:31 PM, Marco D'Ambros <span dir="ltr"><<a href="mailto:marco.dambros@usi.ch">marco.dambros@usi.ch</a>></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: 'alert(''test'');');<br>
text: 'Submit'<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('test') 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>
>> I am trying to use<br>
>><br>
>> SUEvaluator >> callback: value:<br>
>><br>
>> 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>
>> Could you give me some suggestion on how to implement this?<br>
><br>
> That's definitely the right way. You need to consider that the<br>
> Javascript code that is used to calculate the value should be a<br>
> string, because it will be put into the request URL of the evaluator.<br>
> Have a look at the senders of #callback:value: there are several<br>
> examples where values are concatenated in Javascript and split again<br>
> in Smalltalk.<br>
><br>
> Lukas<br>
><br>
> --<br>
> Lukas Renggli<br>
> <a href="http://www.lukas-renggli.ch" target="_blank">http://www.lukas-renggli.ch</a><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>
_______________________________________________<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>