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

Robert Sirois watchlala at hotmail.com
Sat Feb 5 19:44:09 UTC 2011


Is this some sort of sick sociology experiment on people?
RS

> To: seaside at lists.squeakfoundation.org
> From: intrader.intrader at gmail.com
> Date: Sat, 5 Feb 2011 19:42:16 +0000
> Subject: [Seaside] Re: I would like to attach an onClick event according to
> 
> Thanks John, unfortunately your code also suffers from the same problem
> <requirement>
> <button onClick="$('#external_links a').click(function() {
>     return confirm('You are going to visit: ' + this.href);
> });" type="submit" class="submit">Attach Click</button>
> 
> "The confirm returns true or false controlling the action of the anchor. Very 
> simple to say this in JavaScript. See http://jsbin.com/imuka5/2"
> </requirement>
> 
> Not so simple in Seaside as we need to work around the double quotes that the 
> onClick message uses.
> 
> 
> <generated Seaside source>
> <button onclick="$("#external_links a").click(function(){return confirm
> ("Your are going to visit: " + this.href)})" type="submit" 
> class="submit">Attach Click</button>
> </generated Seaside source>
> 
> See the nested double quotes.
> 
> By the way, your code generates exactly the same html as
> <exactly same html as your code>
> onClick: ((html jQuery expression: 'external_links a')
> 	onClick: 'return confirm("You are going to visit: "+ this.href)');
> 		 with: 'Attach Click'
> </exactly same html as your code>
> Sorry, and thanks again
> 
> 
> 
> 
> 
> _______________________________________________
> 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/20110205/2801316d/attachment.htm


More information about the seaside mailing list