[Seaside] [vw]Browser type?

Michel Bany michel.bany at gmail.com
Thu Jul 12 14:11:06 UTC 2007


Cool! Thanks.
Isn't it worth an api?
Michel.


On 12 Jul 2007, at 15:23 , Lukas Renggli wrote:

>> Similarly, do you have a trick for getting the screen dimensions,
>> before showing the first page?
>
> Only through a redirect using JavaScript. The screen resolution is not
> available in the HTTP header.
>
> renderContentOn: html
> 	x isNil ifTrue: [
> 		x := 0. y := 0.
> 		html script: 'window.location.href="' , html context actionUrl  
> asString ,
> 			'&' , (html callbacks registerCallback: [ :v | x := v asNumber]) ,
> 			'=" + screen.width + "' ,
> 			'&' , (html callbacks registerCallback: [ :v | y := v asNumber]) ,
> 			'=" + screen.height' ].
> 	html render: x; text: ' x '; render: y
>
> Lukas
>
> -- 
> Lukas Renggli
> http://www.lukas-renggli.ch
> _______________________________________________
> Seaside mailing list
> Seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside



More information about the Seaside mailing list