Hi,
I am looking for a way to query the size of the browser's document
window when onModuleLoad is called. I have tried
Element body = RootPanel.getBodyElement();
int clientWidth = body.getClientWidth();
int clientHeight = body.getClientHeight();
body.getClientWidth() gives the correct width, but
body.getClientHeight always returns 0. In fact all queries on body
having to do with height return 0.
I had similar problems in pure javascript with
dw = document.body.offsetWidth;
dh = document.body.offsetHeight;
I overcame it there with the following:
// IE does not appear to support window.innerHeight.
if (typeof(window.innerHeight) == 'number')
dh = window.innerHeight;
else if (document.documentElement &&
document.documentElement.clientHeight)
dh = document.documentElement.clientHeight;
else if (document.body & document.body.clientHeight)
dh = document.body.clientHeight;
Anyway to do something similar via GWT?
-Mark
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.