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

Robert Sirois watchlala at hotmail.com
Fri Feb 4 23:26:23 UTC 2011


I'll look at it when I get home, although I did send you a working example last night.

If you don't have the e-mail, it's in the list archives.

RS

> To: seaside at lists.squeakfoundation.org
> From: intrader.intrader at gmail.com
> Date: Fri, 4 Feb 2011 23:19:41 +0000
> Subject: [Seaside] Re: I would like to attach an onClick event according to
> 
> I agree that your are failing to see the problem. I have the most efficient way 
> to to what I want given by the JavaScript:
> <most direct way to do this>
> $('#external_links a').click(function() {
>     return confirm('You are going to visit: ' + this.href);
> });
> </most direct way to do this>
> And I can't do it in Seaside without having to take care of special requirements 
> about strings in the click method (onClick)
> 
> <the direct way does not work>
> html button
> onClick: ((html jQuery expression: '#external_links a') onClick: 'return 
> confirm("You are going to visit: "+ this.href)');
> with: 'Attach Click'.
> </the direct way does not work>
> If does not work because the onClick message enclosed the whole argument in 
> double quotes, sand the converts single quotes to double quotes (incorrectly) 
> with the
> <resulting incorrect javascript>
> <button onclick="$("#external_links a").click(function(){return confirm("You are 
> going to visit: "+ this.href)})" type="submit" class="submit">Attach 
> Click</button>
> </resulting incorrect javascript)
> So think about it and write it in Seaside in a short, concise, and 'say it in 
> Seaside' mode.
> <I have tried>
> 	html button
> 		onClick: ((html jQuery expression: selector)
> 				onClick: 'return confirm("You are going to 
> visit: "+ this.href)');
> 		 with: 'Attach Click'
> </I have tried>
> with select set to 'external_links a', but with the same bad result (nested 
> double quotes).
> Thanks
> 
> 
> 
> _______________________________________________
> 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/20110204/96b7c142/attachment.htm


More information about the seaside mailing list