While searching for a method to find out the window height, i came to know that 'document.body.clientHeight' is useful. I tried it in different situations everything failed. Failed means that it returns same value in all window heights.
Finally I removed the DOCTYPE declaration
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
and everything went ok. Now it return exact result.
Even html5 DOCTYPE
<!DOCTYPE html>
return invalid result.
I checked it in different browsers (Chrome, Opera, Firefox and IE).
What is the reason for that? Is there any other restrictions while using document.body? Is there any other things(variables, tags, methods, usage, etc) under the same scenario?
Thank you.