I want to determine the height of the viewport using Javascript. I have this 550 pixel DIV that I want to display in a browser. However, this height can cause the vertical scroll bar to appear on some browsers (depending on how many toolbars the user has installed). In this case, I want to detect this and warn the user about it.
I tried using document.body.clientHeight , but it doesn't seem to work ... gives me the same height when I tried to add new toolbars and refresh the page.
javascript dom browser height
roebeck
source share