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

John McKeon p3anoman at gmail.com
Sun Feb 6 06:21:29 UTC 2011


renderContentOn: html
       html div id: 'external_links';
with: [
1 to: 5 do: [:x |
html anchor
callback: [x inspect];
with: x.
html break].
       1 to: 5 do: [:x | html text: 'just some content'. html break.]].

html button
onClick: ((html jQuery expression: '#external_links a')
       onClick: 'return confirm("You are going to visit: "+ this.href)');
with: 'Fritz''s Attach Click'.
 html button
onClick: ( (html jQuery expression: '#external_links a')
call: 'click' with: ('return confirm("You are going to visit: " +
this.href)' asFunction));
with: 'My Attach Click'


On Sun, Feb 6, 2011 at 12:09 AM, Fritz Schenk
<intrader.intrader at gmail.com>wrote:

> John
>
>
> > I typed it out using alert, substitute confirm and it works as expected.
>
> Please provide me with the working code.
>
> Sorry, the generated code is:
>
> <generated Seaside source>
>  <button onclick="$("#external_links a").click(function(){alert
>  ("Your are going to visit: " + this.href)})" type="submit"class="submit">
> Attach Click</button>
> </generated Seaside source>
>
> See the nested double quotes. his is the source of the problem
>
> I am being extremely stubborn about this issue as it show a problem with
> the
> onClick message handler in Seaside.
>
> The embedded double quote is not correct!
>
>
>
> _______________________________________________
> 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/20110206/701f3aaf/attachment.htm


More information about the seaside mailing list