[Seaside] [vw]Browser type?
Lukas Renggli
renggli at gmail.com
Thu Jul 12 13:23:58 UTC 2007
> 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
More information about the Seaside
mailing list