Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Aug 2002
    Posts
    433
    Thanks
    3
    Thanked 0 Times in 0 Posts

    find window dimensions

    Hi i want to know how i can find the dimensions of a window. I want to know his curent width and height

  • #2
    Regular Coder
    Join Date
    Mar 2006
    Posts
    726
    Thanks
    35
    Thanked 132 Times in 123 Posts
    Code:
    function winSize(){	
    	var A=[0,0];
    	if(window.innerWidth){
    		A= [window.innerWidth, window.innerHeight];
    	}	
    	else {
    		var D=document.documentElement;
     		if(D && D.clientHeight) A= [D.clientWidth, D.clientHeight];	
    	}	
    	return  A;
    }


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •