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

Robert Sirois watchlala at hotmail.com
Fri Feb 4 05:00:00 UTC 2011


<code>	1 to: 5 do: [:x |			html div			class: 'external_links';			with: [				html anchor					callback: [ x inspect ];					with: x			].	].
	1 to: 5 do: [:x |				html div			id: 'external_links';			with: 'just some content'				].
	html button		onClick: (((html jQuery expression: '.external_links') has: 'a') onClick: 'confirm("You are going to visit: + this.href")');		with: 'Attach Click'.</code>
RS
> To: seaside at lists.squeakfoundation.org
> From: intrader.intrader at gmail.com
> Date: Fri, 4 Feb 2011 04:46:09 +0000
> Subject: [Seaside] Re: I would like to attach an onClick event according to
> 
> Thanks Robert. I have not been able to make it work in Seaside; however, I make 
> it work readily with JavaScript as shown in http://jsbin.com/imuka5.
> 
> This my code for the component in Seaside:
> <code>
> renderContentOn: html 
> 	1 to: 5
> 		do: [:x | html div id: 'external_links';			
> 				with: [html anchor
> 						callback: [x inspect];
> 						 with: x]].
> 	1 to: 5
> 		do: [:x | html div id: 'external_links'; with: 'just some 
> content'].
> 	 html button onClick: (html jQuery expression: '#external_links a') 
> click(function(){return confirm(('You are going to visit: ' + this.href);)})
> 		 with: 'Attach Click'
> </code>
> But the part starting with click() does not work.
> 
> _______________________________________________
> 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/056c5afd/attachment.htm


More information about the seaside mailing list