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

John McKeon p3anoman at gmail.com
Sat Feb 5 08:37:33 UTC 2011


 html button
onClick: ( (html jQuery expression: '#externallinks a')
call: 'click' with: ('return alert("your an ass " + this.href)' asFunction))


On Thu, Feb 3, 2011 at 8:28 PM, Fritz Schenk <intrader.intrader at gmail.com>wrote:

> the following JavaScript:
> <code>
> $('#external_links a').click(function() {
>    return confirm('You are going to visit: ' + this.href);
> });
> </code>
> The only elements receiving the onClick code are those divs that have
> anchors.
>
> I have generated code using Seaside as follows:
> 5 divs with id 'external_links' that contain anchors, and 5 additional divs
> also
> with id 'external_links' that just display text.
> The generated 'source' is:
> <code>
> <div id="external_links">
>  <a href="/whatever?_s=5NvhIEVCuZvzZGEz&_k=7kFMmFlVjrpxySMO&6">1</a>
> </div>
> <div id="external_links">
>  <a href="/whatever?_s=5NvhIEVCuZvzZGEz&_k=7kFMmFlVjrpxySMO&7">2</a>
> </div>
> <div id="external_links">
>  <a href="/whatever?_s=5NvhIEVCuZvzZGEz&_k=7kFMmFlVjrpxySMO&8">3</a>
> </div>
> <div id="external_links">
>  <a href="/whatever?_s=5NvhIEVCuZvzZGEz&_k=7kFMmFlVjrpxySMO&9">4</a>
> </div>
> <div id="external_links">
>  <a href="/whatever?_s=5NvhIEVCuZvzZGEz&_k=7kFMmFlVjrpxySMO&10">5</a>
> </div>
> <div id="external_links">just some content</div>
> <div id="external_links">just some content</div>
> <div id="external_links">just some content</div>
> <div id="external_links">just some content</div>
> <div id="external_links">just some content</div>
> </code>
> I don't know how to use Seaside to generate the javascript given above. I
> have
> tried adding a button with an onClick event containing 'html jQuery
> 'external_links a') click: [] - but I don't know what to say for the click:
> message.
>
>
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>



-- 
http://john-mckeon.us
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20110205/f923a059/attachment.htm


More information about the seaside mailing list