1

enter image description here

In javascript, window.open() with width=500 height=500 open a new window with page size(the area in which the html is displayed) of 500 by 500. But the size of the whole window is larger (width and height in the picture, depends on theme,operating system etc...)

Our system needs to use window.open() in different environments (OS's, themes...). In each environment the window needs to open in max size so it covers the whole screen and only the taskbar is not covered.

In order to do so, I need to be able to find the size of the extra controls(all the aero glass and buttons ). If I had the width and height of whole window, I could substract from it the page size. Is there a way to get those values (height and width of the whole window) ?

Yaron Levi
  • 12,535
  • 16
  • 69
  • 118

2 Answers2

1

if I understand good, you can find the extra space with:

window.outerHeight - window.innerHeight

Seer
  • 739
  • 4
  • 22
1

You could use screen.height;andscreen.width; to get the full scrren resolutions or screen.availHeight to get the height of the visitor's screen, in pixels, minus interface features like the Windows Taskbar.

For information about window.height and sreen.height see the post from jigfox.

Community
  • 1
  • 1
Michael Saiz
  • 1,640
  • 12
  • 20