[Seaside] Little help for callback: value:

Marco D'Ambros marco.dambros at usi.ch
Tue Feb 9 11:31:08 UTC 2010

Ok, thanks.
Now, considering the following code snippet:

(html submitButton)
	onClick: ((html evaluator) 
		callback: [:value | self halt.] 
		value: 'alert(''test'');'); 
	text: 'Submit'

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.
However, when I click the button the javascript is not executed, as the Alert('test') does not appear.


On Feb 9, 2010, at 12:17 PM, Lukas Renggli wrote:

>> I am trying to use
>> SUEvaluator >> callback: value:
>> 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..
>> Could you give me some suggestion on how to implement this?
> That's definitely the right way. You need to consider that the
> Javascript code that is used to calculate the value should be a
> string, because it will be put into the request URL of the evaluator.
> Have a look at the senders of #callback:value: there are several
> examples where values are concatenated in Javascript and split again
> in Smalltalk.
> Lukas
> -- 
> Lukas Renggli
> http://www.lukas-renggli.ch
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

More information about the seaside mailing list