[Seaside] Re: I would like to attach an onClick event according to
Robert Sirois
watchlala at hotmail.com
Fri Feb 4 04:15:43 UTC 2011
You'll just have to learn the packages. #onClick: is the method for binding click events.
In the example, they bind an alert function, so in Seaside it might look like this:
((html jQuery: #external_links) has: 'a') onClick: 'alert('Eeek!')'.
Pop this onto a component... make sure you have the JQueryDeployment added to your libraries.
<code>
html div id: #external_link; style: 'height: 100px; width: 100px; background-color: red'; with: [ html anchor: 'blah' ].
html button bePush; onClick: (((html jQuery: #external_link) has: 'a') onClick: 'alert("Eeek!")'); with: 'Add click event'.
</code>
RS
> To: seaside at lists.squeakfoundation.org
> From: intrader.intrader at gmail.com
> Date: Fri, 4 Feb 2011 03:55:28 +0000
> Subject: [Seaside] Re: I would like to attach an onClick event according to
>
> Robert, thanks - what I am trying to do is translate the following article's
> examples to Seaside.
> http://www.ibm.com/developerworks/library/x-ajaxjquery.html
>
> The first example works in javascript.
>
> And yes, this is contrived and I could generate the onClick events while
> rendering.
>
>
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20110203/741e9e17/attachment.htm
More information about the seaside
mailing list