[Seaside] Re: I would like to attach an onClick event according to
Fritz Schenk
intrader.intrader at gmail.com
Fri Feb 4 04:46:09 UTC 2011
Thanks Robert. I have not been able to make it work in Seaside; however, I make
it work readily with JavaScript as shown in http://jsbin.com/imuka5.
This my code for the component in Seaside:
<code>
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')
click(function(){return confirm(('You are going to visit: ' + this.href);)})
with: 'Attach Click'
</code>
But the part starting with click() does not work.
More information about the seaside
mailing list