[Seaside] Read two values ( width @ height ) with only one declaration

Johan Brichau johan at inceptive.be
Sat Jan 4 16:15:20 UTC 2014


You will need to construct a valid javascript expression in the argument passed after #value:.
Alternatively, try using the #callback:json: method to transfer multiple values:

(html jQuery ajax
  	callback: [ :dict | dict inspect ]
   	json: (JSStream on: '{ "width": $(this).width, "height": $(this).height}')

Hope this helps
Johan

On 04 Jan 2014, at 17:03, dtrussardi at tiscali.it wrote:

> Hi,
> 
> 	i need to read two parameters  ( width @ height )  relative to  a DIV element.
> 
> 	For now i use this declarations:
> 	
> 		
> 		html div class: 'topSide';
> 			" read width "	
> 				onClick: (html jQuery ajax
>   							   callback: [ :x | x inspect ]
>    							   value:  (html jQuery this width)).
> 	
> 			"raed height "
> 				onClick: (html jQuery ajax
>   							   callback: [ :x | x inspect ]
>    							   value:  (html jQuery this height)).
> 
> 
> 	Now my question is:
> 
> 		i can read the two values with only one declaration?
> 
> 		How i can define the 		value: ( html jQuery this width................ '@' ............... html jQuery this height )
> 
> 
> 			 for concatenated  the two values and return a string in form of string Point:	'200 at 400'
> 
> 	
> 		I declared :   		value: ( html jQuery this width, '@' , html jQuery this height )
> 
> 			but it don't work.
> 
> 	Considerations?
> 
> 
> 		Thanks,
> 
> 			Dario_______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside



More information about the seaside mailing list