Login or Sign Up
Logging in...
Remember me
Log in
Or
Sign Up
Forgot password or user name?
Log in with
Search in titles only
Search in Javascript only
Search
Advanced Search
Forums
Product Launch
Updates
Today's Posts
Member List
Calendar
Home
Forum
Topic
Javascript
How to get the Height of window
Collapse
X
Collapse
Posts
Latest Activity
Photos
Page
of
1
Filter
Time
All Time
Today
Last Week
Last Month
Show
All
Discussions only
Photos only
Videos only
Links only
Polls only
Events only
Filtered by:
Clear All
new posts
Previous
template
Next
soms2m
New Member
Join Date:
Apr 2008
Posts:
6
#1
How to get the Height of window
Apr 17 '08, 09:01 AM
Hello All,
How to get the dynamically increasing height of the window using javascript?\
Thank you all,
mrhoo
Contributor
Join Date:
Jun 2006
Posts:
428
#2
Apr 17 '08, 02:07 PM
Here is one way- it adds a global winSize array with two methods.
Calling winSize[0]() returns the window width,
winSize[1]() returns the height.
[CODE=javascript](function(){
if(window.inner Width){
winSize=[function(){ return window.innerWid th},
function(){retu rn window.innerHei ght}]
}
else{
var B= document.body;
var D= document.docume ntElement;
D= (D.clientWidth) ? D: B;
winSize=[ function(){retu rn D.clientWidth},
winHeight= function(){retu rn D.clientHeight}]
}
})()[/CODE]
Comment
Post
Cancel
Previous
template
Next
Working...
Yes
No
OK
OK
Cancel
👍
👎
☕
Comment