[Seaside] Re: I would like to attach an onClick event according to

Fritz Schenk intrader.intrader at gmail.com
Sun Feb 6 22:32:37 UTC 2011

Boris, please try my code in Visual works to see it works as I have seen a 
posting that suggest that some Seaside (or Pharo) implementation translates
the single quote to " and that would work on.
Here is the code of renderContentOn
renderContentOn: html 
    1 to: 5 do: [:x |
       html div id: 'external_links';
	    with: [html anchor callback: [x inspect];
       with: x]].
    1 to: 5 do: [:x |
       html div id: '\"external_links\"';
       with: 'just some content'].
    html button
       onClick: ((html jQuery expression: 'external_links a')
	   onClick: 'return confirm("You are going to visit: "+ this.href)');

As you see the code 'injects' elegantly the behavior I want without touching
the code of the HTML.

More information about the seaside mailing list