[Seaside] AJAX evaluator and javascript

Squeaker squeakman at gmail.com
Thu Sep 18 12:43:28 UTC 2008


Greetings,

I am trying to do the following:
on the client browser, when the user clicks on something, I would like 
to use the "html evaluator" to send a bit of javascript code back to the 
client and execute the javascript code.

Here is the code that I have:

html div id: 'foo';
	onClick: (html evaluator
		callback: [:script |
			script add: 'var bar ="This is a test"'.
			script call: 'alert' argument: 'bar']);
	with: 'Show Alert'.

What I am expecting is a Javascipt alert to pop up. What am I doing wrong?

Thanks,
Frank



More information about the seaside mailing list